custom physics body turns grey

I have a custom shape, Flipper, a 6 side polygon attached to png. There is also circle on the stage which can be rotated. As soon as I rotate the circle, the custom shape turns grey and no collision interactions occur. Eliminating the custom shape and just using the image bounds to of the Flipper png to define the physics object, the physics work fine.

What does it mean when a shape turns grey? Any idea what I might be doing wrong? [import]uid: 96383 topic_id: 20081 reply_id: 320081[/import]

if physics body turns gray because it is “sleeping” it will turn orange as soon as it will collide or react to something [import]uid: 16142 topic_id: 20081 reply_id: 78410[/import]

Thanks. I wondered if it was sleeping, and tried myBody.isAwake = true to keep it from doing so, but that has no effect on the behavior.

And idea why would it sleep as soon as another object begins to move? As I said, it only does this when the customShape is assigned to it. The default png boundaries allow proper collisions and do not change the object to grey.

[import]uid: 96383 topic_id: 20081 reply_id: 78412[/import]

Make sure to set:

[lua]physics.start( true ) – prevent all bodies from sleeping[/lua]

and so the bodies wouldn`t sleep anymore.
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 20081 reply_id: 78414[/import]

Thanks Rodrigo - that worked to keep it awake, but it’s not interacting. Any common reason it would collide just fine as a non custom body, but fail to collide as a custom shape? Is there anything wrong you can see with this code? I’ve not used physics before, so I sure appreciate any help.

[code]

local flipper = display.newImage(“flipper.png”);
flipper.x = 665
flipper.y = 930
flipperShape = { -74,-24, -68,-16, 59,53, 78,5, -58,-30, -71,-30 }
physics.addBody( flipper, { shape=flipperShape } )
localGroup:insert(flipper)

[/code] [import]uid: 96383 topic_id: 20081 reply_id: 78417[/import]

Sorry @khincker but am not that expert.

I do not see any problem in your code but as I said it`s better to see the answer of someone else as Mrs. Peach or so.

Anyway, I think that if this code you posted above has bug it would be in the coordinates but sincer, I do not know.
Let`s wait.
Wish luck.
Rodrigo. [import]uid: 89165 topic_id: 20081 reply_id: 78422[/import]

I seem to recall somewhere that the order of the points in your physics object must run clock-wise. Your points run counter-clockwise. Switch it and see if that fixes the issue. [import]uid: 64596 topic_id: 20081 reply_id: 78437[/import]

Hey guys,

As Shane said you want to do your points in a clockwise order, yes.

You also want to make sure that physics bodies that you want to interact are in the same group.

Please let us know how you go with that :slight_smile:

Peach [import]uid: 52491 topic_id: 20081 reply_id: 78455[/import]

Yes, that fixed it, I thank you so much.
[import]uid: 96383 topic_id: 20081 reply_id: 78461[/import]