Physics: rotating around other than the center

Hello! I’ve been enjoying this tool very much and the good irc community.

Have a question though that seems to have me saying “really??”

When I read this article:
http://lb-c1.anscamobile.com/reference/index/objectsetreferencepoint

It says “you may encounter problems when changing the reference point of a physics object”.

So my question is, how do I fix that for a physics object?

Let’s say I have two pieces of an alligator’s jaw. Both are attached to the face on the left. If a bunny falls on it, it should bounce off of it, but meanwhile the jaw has to open and close, via rotating the two pieces of its jaw. The rotation can’t be from the middle of the jaw pieces cause that would just be a propeller-lip twist, it has to rotate from one edge of the jaw-pieces.

What is the work around?

This must be possible but I am not seeing how to do it yet because whenever I change the reference point via xReference or setReferencePoint it results in the object losing its correct physics relationships to the board.

Thanks for any help you can offer!

My the alligators smile upon you. [import]uid: 150267 topic_id: 26791 reply_id: 326791[/import]

I should clarify that just changing the reference point results in physics problems, rotating the object or not is not even relevant (yet) since just changing the reference point breaks the physics engine… [import]uid: 150267 topic_id: 26791 reply_id: 108743[/import]

One workaround would be to “mirror” the physics objects. For example, if the alligator’s jaw dimensions are 100x25 then make it a complex physics body made up of two 100x25 pieces and make the jaw part a regular physics body and the other part a sensor. That way the center of the physics body is at the end of the jaw piece and and you should be able to rotate it the way you want. [import]uid: 27965 topic_id: 26791 reply_id: 108755[/import]

Sorry for the slow reply. Thank you for the suggestion! I’ve since resolved this one. [import]uid: 150267 topic_id: 26791 reply_id: 117925[/import]