Gravity Engine  1.5
Unity Asset for Gravity
OrbitPredictor Class Reference

Orbit predictor. An in-scene object that will determine the future orbit based on the current velocity. Depending on the velocity the orbit may be an ellipse or a hyperbola. This class requires a delegate of each type to compute the orbital path. More...

Inheritance diagram for OrbitPredictor:

Public Attributes

int numPoints = 100
 
GameObject body
 
GameObject centerBody
 
OrbitData orbitData
 

Detailed Description

Orbit predictor. An in-scene object that will determine the future orbit based on the current velocity. Depending on the velocity the orbit may be an ellipse or a hyperbola. This class requires a delegate of each type to compute the orbital path.

Orbit prediction is based on the two-body problem and is with respect to one other body (presumably the dominant source of gravity for the affected object). The OrbitPredictor will add both an OrbitEllipse and an OrbitHyper and use one or the other to plot the projected orbit based on the velocity. The class OrbitData is used to determine the orbital parameters for the velocity.

The general orbit prediction problem is significantly harder - it would require simulating the entire scene into the future - re-computing whenever user input was provided. Not practical.


The documentation for this class was generated from the following file: