- Home /
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).
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
Can anyone guide me into the right direction about how to achieve this? Thanks!
Hi, Did you by any chance figure out how to do this? I'm trying to accomplish the same thing.
Answer by Doker2030 · Mar 16 at 02:19 PM
I have a similar problem. I suggest forcing the object (spaceship?) to enter the orbit at 45 degrees.
Answer by andrew-lukasik · Mar 16 at 04:49 PM
Circular orbits is achieved by:
incoming at
0
degrees angle (tangent vector, basically)at a
v = sqrt( mu / r )
. Wherev
is[m/s]
,r
is[m]
,mu
is[m³/s²]
.
Your answer
Follow this Question
Related Questions
Put texture on game object from file. 1 Answer
Player movement against skybox 0 Answers
Third Person Camera Orbit 0 Answers
Making my camera script snap back to original position 1 Answer