Make gravity force opposite normal

Post Reply
Shtille
Posts: 8
Joined: Sat Jan 21, 2017 5:08 pm

Make gravity force opposite normal

Post 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:
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Make gravity force opposite normal

Post 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 ;-)
Post Reply