Presently, setting an xScale or yScale attribute on an image, even if doing so before adding the image to Box2D via physics.addBody, results in the wrong bounding box being set by Box2D.
So, there are really two bugs to fix:
-
Box2D should be able to evaluate a Display Object’s
xScaleandyScaleproperties during the invocation ofphysics.addBody, and scale the bounding box accordingly. This should be two lines of code at most. -
Box2D should be able to intercept changes to a Display Object’s
xScaleandyScaleproperties after the Display Object has been added as a physics body, and scale the bounding box accordingly. [import]uid: 71767 topic_id: 19618 reply_id: 319618[/import]