How to get position of a shape?

Official forum for the Chipmunk2D Physics Library.
Post Reply
lajos
Posts: 1
Joined: Sun Mar 15, 2009 2:02 pm
Contact:

How to get position of a shape?

Post by lajos »

New to this forum and chipmunk. Thanks for making this awesome physics engine!

I have a shape that's attached to a rigid body, but it's offset from the center
of the body.

How do I query the position of the shape during simulation?
ker
Posts: 56
Joined: Tue Jul 15, 2008 4:13 am
Contact:

Re: How to get position of a shape?

Post by ker »

you can't really query the position of the shape, you'd use cpBodyLocal2World(yourBody, shapeOffset); to compute it.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests