Get body from shape

Official forum for the Chipmunk2D Physics Library.
Post Reply
tetraweb
Posts: 31
Joined: Wed Feb 13, 2013 8:46 pm
Contact:

Get body from shape

Post by tetraweb »

Can't seem to figure out the objective-c equivalent to get a body of a given shape. Must not be searching for the right terms?

Greg
LegoCylon
Posts: 29
Joined: Wed May 09, 2012 12:06 am
Contact:

Re: Get body from shape

Post by LegoCylon »

Is this c function not accessible?
cpBody* cpShapeGetBody (const cpShape* shape);

Or accessing this member variable?
cpShape->body;
tetraweb
Posts: 31
Joined: Wed Feb 13, 2013 8:46 pm
Contact:

Re: Get body from shape

Post by tetraweb »

Yes, of course, thanks. My brain was misfiring. It is simply
ChipmunkBody *body = shape.body;

Greg
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests