Object gravity

Official forum for the Chipmunk2D Physics Library.
Post Reply
Thristhart
Posts: 1
Joined: Mon Jun 15, 2009 4:26 pm
Contact:

Object gravity

Post by Thristhart »

How might I go about assigning a shape it's own gravity vector (so that it and everything else in the space follows one gravity, then it changes gravity while everything else remains the same). This is for a platformer I'm working on where the main puzzle involves changing the directional gravity of objects. I could theoretically simulate the gravity by applying forces but that doesn't seem optimal.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Object gravity

Post by slembcke »

The gravity parameter on spaces is really just a convenience. If you want to create funky gravity puzzles you will have to either use forces or custom velocity update functions.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests