- Home /
How to make an orbital movement as smoothly as possible?
Hi, Unity! This is my first game and it is a bit complicated concerning the physical concepts. I am looking forward to making a game where I launch a dynamic object in a space where it flyes near a static with a bigger mass object. Imagine that dynamic object as a spaceship and the static one as a planet. Both are actioned by gravitational forces. The static object attracts the dynamic one, therefore the spaceship moves on an eliptical orbit. The spaceship has some propellers which make it rotate and influence somehow its orbital movement.
My biggest issue is how I could program such a smooth physical movement to acquire the aforementioned physical effect. I know I need first of all formulas which describe an eliptical movement, the gravitational attraction and so on. It is on the whole a quite little project, but the physics part is just overwhelming. I am currently making documentation, but should be someone that has it better with the physics or even has programmed such a thing, I would like to be provided with the useful physics documentation, perhaps some links, tutorials, anything that could pe proved informative.
$$anonymous$$aybe two things already suffice:
- $$anonymous$$nowing when to start the gravitational attraction (Sphere collider?) - Adding Force to the ship from every attractor based on distance to its core
I just think that adding those up and handing those to the physics engine by AddForce from everyone involved will result in an accurate enough result.
Ok, I am going to develop something alike. Anyway, you might have just made my day better and for that I thank you!:)