Gravity Engine 12.0
Unity Asset for Gravity
Loading...
Searching...
No Matches
ClosestApproach Class Reference

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...

Inheritance diagram for ClosestApproach:

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)
 

Detailed Description

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.


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