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:
1. Box2D should be able to evaluate a Display Object's xScale
and yScale
properties during the invocation of physics.addBody
, and scale the bounding box accordingly. This should be two lines of code at most.
2. Box2D should be able to intercept changes to a Display Object's xScale
and yScale
properties after the Display Object has been added as a physics body, and scale the bounding box accordingly.