Gravity Engine 12.0
Unity Asset for Gravity
|
Monitor the distance between two NBody objects and trigger when the closest approach occurs. The trigger event is communicated to an array of listener objects that implement the OnClosestApproachTrigger defined in the IClosestApproach interface. More...
Public Member Functions | |
void | SetTriggered (bool value) |
Public Attributes | |
GameObject[] | listeners |
NBody | body1 |
NBody | body2 |
float | approachDistance = 100f |
closest approach must be smaller than this value to trigger (scaled units) | |
Monitor the distance between two NBody objects and trigger when the closest approach occurs. The trigger event is communicated to an array of listener objects that implement the OnClosestApproachTrigger defined in the IClosestApproach interface.
A minimum distance threshold must have been met to generate a trigger.
A trigger is only generated on the first closest approach.