Page 1 of 1

Rocket Landing

Posted: Wed Dec 23, 2015 4:31 pm
by guilhermeramos

I've using bullet and the java port for a while, but I've to admit that I have no clue how to do this.

Inspired by the Falcon 9 autonomous landing, I would like to create something similar.

First I need to tackle the takeoff. How can I apply a force into a rigid body strong enough to revert gravity and move up like the rocket?
After a certain altitude, falling down, how can I apply a force to slow down the fall?

Basically, as you can see, I just need to understand how to apply localized forces into a body to make it move. I don't know if it is the case,
but I don't want to actually "just" update the position of the body. Does that make sense?

Can you, gurus, help me?
A simple plane and a cylinder will suffice in this scenario.

Thank you!

Re: Rocket Landing

Posted: Thu Dec 24, 2015 4:09 am
by Basroil
This is practically trivial in Bullet thankfully :D Just call "applyForce" on the rigid body you want to be moved and apply a force vector parallel with the direction of the body orientation . If you want vectored thrust you can use the same thing with an offset (second input for that function) set at the location of the thruster and force in the direction of the thruster.

Re: Rocket Landing

Posted: Thu Dec 24, 2015 4:15 am
by guilhermeramos

I'm gonna try that! Thank you!