Class ObjectCollisionSensor
Inheritance
ObjectCollisionSensor
Assembly: Xareus.Unity.Librairies.dll
Syntax
[Renamed("SEVEN.Unity.ObjectCollisionSensor", "Assembly-CSharp")]
[FunctionDescription("When the second object is not defined, the event context will list all corresponding objects in the 'objects' path while only one of the colliding object will be in the 'object2' path")]
public class ObjectCollisionSensor : AInUnityStepSensor
Constructors
ObjectCollisionSensor(Event, Dictionary<string, Parameter>, IContext, IContext, IContext)
Declaration
protected ObjectCollisionSensor(Event @event, Dictionary<string, Parameter> parameters, IContext externalContext, IContext scenarioContext, IContext sequenceContext)
Parameters
Fields
IN_COLLISION
Declaration
public const string IN_COLLISION = "In Collision"
Field Value
OBJECT1
Declaration
[EventContextEntry]
public static readonly string OBJECT1
Field Value
OBJECT2
Declaration
[EventContextEntry]
public static readonly string OBJECT2
Field Value
OBJECTS
Declaration
[EventContextEntry]
public static readonly string OBJECTS
Field Value
inCollision
Must the objects be in collision?
Declaration
[AdvancedConfigurationParameter("In Collision", true, "This parameter will be removed in a later version. Use the Negate Parameter instead", Necessity.Optional)]
protected readonly bool inCollision
Field Value
object1
Declaration
[ConfigurationParameter("Object 1", Necessity.Required)]
protected GameObject object1
Field Value
Type |
Description |
GameObject |
|
object2
Declaration
[ConfigurationParameter("Object 2", "The second object to check the collision or abscence of collision with (Any object will trigger the sensor if not set)", Necessity.Optional)]
protected GameObject object2
Field Value
Type |
Description |
GameObject |
|
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()
Checks the collision state
Declaration
public override ASensor.Result UnityStepSensorCheck()
Returns
Overrides