Page 1 of 1

Make gravity force opposite normal

Posted: Sat Jan 21, 2017 7:02 pm
by Shtille
Hello there. I'm new to Bullet and my goal isn't that standart, that's why i'm here.

Guys, i'm planning to make a game like Spore with generated planet. So there's a question: how do i make gravity force point opposite the direction of the normal in current objects collision?
Thanks for your patience. :wink:

Re: Make gravity force opposite normal

Posted: Sat Jan 21, 2017 10:57 pm
by benelot
Hi,
So you basically want a custom kind of gravity so that an object is attracted inverse to the surface normal? What is it attracted by when it is not in contact with another object? You have to apply custom forces to your rigidbodies in the direction you want your gravity. But first you need to define a proper gravity model, otherwise your objects fall off the planets when they jump ;-)