DisplayObject should include centreofmassOffset

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
imtrobin
Posts: 101
Joined: Thu Jun 11, 2009 3:03 am

DisplayObject should include centreofmassOffset

Post by imtrobin »

Just checking. Should the DisplayObject rendering take into account of centreOfMassOffset as well?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: DisplayObject should include centreofmassOffset

Post by Norbo »

The display objects are all based only on the centerPosition as it generally is the geometric center of a shape that the graphics require for rendering. It coincides with the center of the collision shape that the engine uses. When an object rotates around its center of mass, the centerPosition is offset from it using the centerOfMassOffset rotated by the orientation of the object.
imtrobin
Posts: 101
Joined: Thu Jun 11, 2009 3:03 am

Re: DisplayObject should include centreofmassOffset

Post by imtrobin »

I see. I use the bottom of the object as visual object centre, so I will offset it then.
Post Reply