So first of all, you don't want the ChipmunkBaseObject protocol. That's really only used internally. You want to use the ChipmunkObject protocol, which is what you need to implement to add or remove custom composite objects to a ChipmunkSpace.
Several of the examples and tutorials show how to use it. Search for ChipmunkObject in here:
http://chipmunk-physics.net/tutorials/C ... cos2D.html
In the implementation it's really just as simple as declaring a property like this:
https://github.com/slembcke/ChipmunkCol ... Ball.h#L36
Then initializing it with an array of other objects that implement the ChipmunkObject protocol:
https://github.com/slembcke/ChipmunkCol ... all.m#L114
As for why they don't converge as well the second time, I'm not sure without more information unfortunately.
Move Object (Body) to Location
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Move Object (Body) to Location
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 18
- Joined: Thu Jun 13, 2013 4:56 pm
- Contact:
Re: Move Object (Body) to Location
Thanks it worked out well. The problem was my gravity setting. It was too high.
Who is online
Users browsing this forum: No registered users and 32 guests