Question for a new project

Laughing_Gas

02-06-2008 03:12:34

Im working on a new project with gravity reversing as a key component. I'm using NxOgre at the moment, but im not sure its possible to do what I want with it, so I'm just going to ask this on the forums for all the physics wrappers. I need to be able to reverse gravity on one object at a time, but they still need to be able to interact with each other. So my question is basically can I do this with Newton?

pra

02-06-2008 13:52:08

Yes, you can.
Gravity works through adding forces in callbacks, you can set the default callback to all bodies, then they will have the same, default gravity. You can also set a custom callback, and then set gravity according to the object that called it. the callback recieves a pointer to the calling object's body (you can store a void* in the body, good for pointers to your object class). you can also set a method of your object class as a callback