Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
Trajectory Class Reference
Inheritance diagram for Trajectory:

Public Member Functions

void Cleanup ()
 
TrajectoryData GetData ()
 
void Init (float worldTime)
 
void AddPoint (Vector3 point, float pointTime, float currentTime)
 Adds a point to the trail. Points are added if they are minVertexDistance from the last point.
 
void MoveAll (Vector3d moveBy3d)
 Move a trajectory, it's data and time/text markers.
 
void AddData (Vector3 r, Vector3 v, float t)
 Add data point to the detailed record of the trajectory. These are later used to determine trajectory intercepts.
 

Public Attributes

float minVertexDistance = 0.1f
 Distance interval for points to be added to the renderer.
 
GameObject timeMarkerPrefab
 Object to be created every timeMarkInterval.
 
float timeMarkInterval = 2.0f
 Interval between time markers.
 
GameObject textPrefab
 Prefab to be added for text labels showing time along trajectory.
 
bool rotateText
 Rotate text to align with trajectory.
 
int maxPoints = 1000
 maximum number of points in the line renderer
 
bool recordData
 

Member Function Documentation

◆ AddData()

void Trajectory.AddData ( Vector3  r,
Vector3  v,
float  t 
)

Add data point to the detailed record of the trajectory. These are later used to determine trajectory intercepts.

Parameters
r
v
t

◆ AddPoint()

void Trajectory.AddPoint ( Vector3  point,
float  pointTime,
float  currentTime 
)

Adds a point to the trail. Points are added if they are minVertexDistance from the last point.

Parameters
pointPoint.

◆ MoveAll()

void Trajectory.MoveAll ( Vector3d  moveBy3d)

Move a trajectory, it's data and time/text markers.

Used by GravityEngine.MoveAll()

Do not call from game code.

Parameters
moveBy

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