This project has moved. For the latest updates, please go here.

Change Pivot point of a body

Aug 27, 2009 at 3:25 PM

Hi is there anyway to change the pivot point of a body, I create the verts from the texture and would like the pivot to be (width, heigh rather than (width / 2, height / 2).


Cheers jay

Aug 27, 2009 at 3:41 PM

You can offset the geometry from the body. Just use the constructors with the offset argument.

You will also have to offset stuff like joints and springs. if you add a revolute joint with no offset, it will revolve around the body position. That is also one of the reasons the center of geometries is used instead of upper left corner or lower right corner.

Aug 27, 2009 at 4:50 PM
Edited Aug 27, 2009 at 4:51 PM

Thats for the quick response, works perfectly. Didn't see the constructor overloads.


Cheers for help.