![]() Satelite.GetComponent().AddForce(forces * ltaTime, ForceMode.Force) īut I don't know how to predict future points in time to give me the orbit shape. Var distance = sateliteCords - planetCords ĭistanceFromSatelite = Vector3.Distance(, ) į = (Gravity * Mass) / Mathf.Pow(distanceFromSatelite,2) įorces = (distance / Mathf.Sqrt(Mathf.Pow(distance.x, 2)+ Mathf.Pow(distance.y, 2)+ Mathf.Pow(distance.z, 2))) * -F I have managed to get realistic physics and orbits when adding gravitational forces to a rigidBody: var sateliteCords = ![]() ![]() ![]() I am trying to make a game with Unity that uses rockets that are in orbit and can transition to different planets, but I need to predict the rocket path in real-time, depending on the current velocity/direction of the rocket allot like spaceflight simulator does.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |