Scaling physics objects

How do you change the scale of a physics object?

local body = display.newCircle( 0, 0, 10 );  
body:setFillColor ( 255, 0, 0, 0 );  
display.getCurrentStage():insert(body);  
physics.addBody( body, "static", physicsData:get("myBody") );  

Doing this has no effect:

body:scale(-1, 1);  

I want to reverse the physics body when the object changes direction. [import]uid: 52127 topic_id: 11746 reply_id: 311746[/import]

@jn19,
scaling and reversing a physics body are two different things. Even with a 2D image, scaling means changing the size, with -1,1 you are flipping it.

In the case of the Physics body, when you say reverse it, you mean reverse the gravity or the image of the physics body? In your case it is a circle, how do you reverse a circle? So it must be the gravity that you want to reverse.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 11746 reply_id: 42757[/import]

Yes, but notice that the circle has an alpha of zero - you don’t see it. What I’m concerned with is the associated custom physics body. I just want to “flip” it. Think of a cat facing left - I want it to face right. [import]uid: 52127 topic_id: 11746 reply_id: 42759[/import]