Space flight libraries?

Are there any helper libraries or walkthroughs available for spaceflight ? Basically I want to take one vector, and slowly transition it to another vector, but I’m not sure if this is done through matrices, quaternions, or just vector multiplication, so thought I’d ask here.

Sounds like you want to use Vector3.lerp()? In any event, for a more realistic simulation it’s better to model the movement based on a simple physical locomotion model. Meaning your rocket has a `mass` and produces a `force`. Based on these two metrics, you can then compute various intermediate values (acceleration, velocity, displacement) and finally the new position of your 3D object.

In game development, you usually use steering behaviors and a simple `Vehicle` model for this. A basic example looks like so:

https://mugen87.github.io/yuka/examples/steering/seek/

Check out this link which demonstrates the computation of the mentioned metrics.

3 Likes

ah thanks this hits the nail on the head.
I think I need both approaches actually, I probably used the wrong phrase in ‘space flight’, this is a space shooter, and I need to account both for the overall vector of the ship, and for the lerp between the ships current rotation and desired rotation, and they’re really separate concerns. Straight lerp() should work handling player “look”, and then I factor the output of ( that + acceleration ) into the ship direction calculation