How to get body from space.

Official forum for the Chipmunk2D Physics Library.
Post Reply
midhunadarvin
Posts: 1
Joined: Thu Jan 01, 2015 6:12 am
Contact:

How to get body from space.

Post by midhunadarvin »

Is there any way i can get the reference to the bodies within the space using any function?
LegoCylon
Posts: 29
Joined: Wed May 09, 2012 12:06 am
Contact:

Re: How to get body from space.

Post by LegoCylon »

If you want to walk through all bodies in a space, you can use cpSpaceEachBody.

If you want to find bodies that are near an area or that intersect a line segment, use one of the Query functions.

That will give you access to the shapes, and from the shapes you can get access to their body using cpShapeGetBody.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests