Physics Body Not Scaling to Image Scale

From what I read in the docs, I should be able to scale the image before adding a physics body, and the physics body will form to the scaled image size. But this is not occurring with the following code. The physics bodies are the original image size.

physics.setDrawMode( 'hybrid' ) local img = display.newImage( 'img.png', 0, 0, true ) img.xScale, img.yScale = .4, .4 physics.addBody( img, "static", { friction=0, bounce=.5 } ) [import]uid: 4596 topic_id: 15261 reply_id: 315261[/import]

It’s confusing, some bounds seem ok, while others seem off, and nothing seems to match what setDrawMode is showing. [import]uid: 4596 topic_id: 15261 reply_id: 56343[/import]

I haven’t tried your case, but I noticed that if I have all my physics bodies in one display group I can scale it afterwards and the physics still works. However, the hybrid drawMode still shows the original outlines of physics bodies (even tough they have been scaled). [import]uid: 13507 topic_id: 15261 reply_id: 56353[/import]

I can confirm that setDrawMode does not respect scaling. Collision behavior scales properly, but setDrawMode draws unscaled. [import]uid: 98409 topic_id: 15261 reply_id: 62025[/import]