Class DistanceSensor
Checks if the distance between the given transforms is less than the provided distance (in meter).
Inheritance
DistanceSensor
Assembly: Xareus.Unity.Librairies.dll
Syntax
[Renamed("SEVEN.Unity.DistanceSensor", "Assembly-CSharp")]
[FunctionDescription("When height is ignored, the distance is calculated using X an Z axes")]
public class DistanceSensor : AInUnityStepSensor
Constructors
DistanceSensor(Event, Dictionary<string, Parameter>, IContext, IContext, IContext)
Declaration
protected DistanceSensor(Event @event, Dictionary<string, Parameter> parameters, IContext externalContext, IContext scenarioContext, IContext sequenceContext)
Parameters
Fields
DISTANCE
Declaration
[EventContextEntry]
public static readonly string DISTANCE
Field Value
distance
Declaration
[ConfigurationParameter("distance", Necessity.Required, Description = "Distance must be >= 0")]
protected float distance
Field Value
ignoreHeight
Declaration
[ConfigurationParameter("ignore height", Necessity.Required, Description = "Enable to ignore the height (y) while checking the distance")]
protected bool ignoreHeight
Field Value
Declaration
[ConfigurationParameter("transform1", Necessity.Required)]
protected Transform transform1
Field Value
Declaration
[ConfigurationParameter("transform2", Necessity.Required)]
protected Transform transform2
Field Value
Methods
SafeReset()
Reset a sensor. Note that this code will be executed in unity's thread and the declared parameters (using the ConfigurationParameter attribute) are already filled
Declaration
public override void SafeReset()
Overrides
UnityStepSensorCheck()
This method is called at each selected Unity execution step in Unity's thread. The Unity execution steps used depend on the ExecutionStep property
Declaration
public override ASensor.Result UnityStepSensorCheck()
Returns
Overrides