Smooth enter orbit

Hi,

I’m developing a space-like game with a planetary system and a orbiting object with ability to land on a planet orbit.

It’s a 3D game where Z is top/down. The orbital system it’s a hierarchy of parented GameObjects controlled by rotations scripts. There is no physics in game except some trigger colliders.

The Orbital object(Planet) has a orbiting ring where the player land if it get reached (blue circle).

36136-orbitsystem.png

When player reach the orbit, velocity get converted to rotation speed and player get parented to ring objet and start orbiting.

The biggest issue with this approach is that it doesn’t look natural when landing angles are more than 45 degree, playerobject has a trail attached and the visual look is awfull;

My idea was to separate the landing process in 3 stages and define a 3 points where the playerObject should pass before it land(get parented) to orbit ring.

So, when a player enter P1 it should rotateTowards P2 in the same time as moving to it, the same for P2->P3

36138-orbitsystem3.png

Can anyone guide me into the right direction about how to achieve this?
Thanks!

I have a similar problem. I suggest forcing the object (spaceship?) to enter the orbit at 45 degrees.

Circular orbits is achieved by:

  • incoming at 0 degrees angle (tangent vector, basically)

  • at a v = sqrt( mu / r ). Where v is [m/s], r is [m], mu is [m³/s²].