A base class for implementing Impact Triggers. It is not necessary to inherit from this class when making your own trigger, but it contains methods and properties you might find useful.
- Template Parameters
-
More...
|
IImpactObject | getImpactObject (GameObject collider) |
| Attempts to retrieve an IImpactObject to send interaction data to. If MainTarget is set, MainTarget will be returned. Otherwise it will attempt to get the IImpactObject component from the given game object or one of its parents. More...
|
|
void | processCollision (TCollision collision) |
| Takes the given IImpactCollisionWrapper and processes it based on the trigger settings. Override buildAndSendCollisionParameters to receive the built data and convert it to IInteractionData to send to an IImpactObject. More...
|
|
void | processCollisionSingleContact (TCollision collision) |
| Takes the given IImpactCollisionWrapper and processes it for a single contact only (the first contact). Override buildAndSendCollisionParameters to receive the data and convert it to IInteractionData to send to an IImpactObject. More...
|
|
void | processCollisionSingleAveragedContact (TCollision collision) |
| Takes the given IImpactCollisionWrapper and processes it for a single averaged contact. Override buildAndSendCollisionParameters to receive the data and convert it to IInteractionData to send to an IImpactObject. More...
|
|
void | processCollisionMultipleContacts (TCollision collision) |
| Takes the given IImpactCollisionWrapper and processes all of it's contact points. Override buildAndSendCollisionParameters to receive the data and convert it to IInteractionData to send to an IImpactObject. More...
|
|
void | processCollisionContact (TCollision collision, TContact contactPoint) |
| Process a collision contact to get all material and velocity data. The material and velocity data will be sent to buildInteractionData, which you can override. More...
|
|
ImpactTagMask? | getOtherObjectTagMask (IImpactObject impactObject, Vector3 point, int otherPhysicsMaterialID, bool hasOtherObject) |
|
virtual void | buildInteractionData (IImpactObject target, TCollision collision, TContact contactPoint, VelocityData myVelocityData, VelocityData otherVelocityData, ImpactTagMask? tagMask, float compositionValue) |
| Called by the process methods to build IInteractionData. Override this if your custom triggers are using any of the process methods. More...
|
|
void | invokeTriggeredEvent (InteractionData interactionData, IImpactObject impactObject) |
|
|
bool | Enabled [get, set] |
| Should this trigger process any collisions? You should use this instead of the normal enabled property because collision messages are still sent to disabled components. More...
|
|
ImpactObjectBase | MainTarget [get, set] |
| The ImpactObjectBase this trigger will use for interaction calculations. More...
|
|
bool | UseMaterialComposition [get, set] |
| Should this trigger use the material composition of the objects it hits? If true, interaction data will be sent for each material at the interaction point. If false, interaction data will only be sent for the primary material at the interaction point. More...
|
|
ImpactTriggerContactMode | ContactMode [get, set] |
| How collision contacts should be handled. More...
|
|
bool | HighPriority [get, set] |
| Should this trigger ignore the Physics Interactions Limit set in the Impact Manager? More...
|
|
bool | Enabled [get, set] |
| Should this trigger process any collisions? You should use this instead of the normal enabled property because collision messages are still sent to disabled components. More...
|
|
ImpactObjectBase | MainTarget [get, set] |
| The ImpactObjectBase this trigger will use for interaction calculations. More...
|
|
bool | UseMaterialComposition [get, set] |
| Should this trigger use the material composition of the objects it hits? If true, interaction data will be sent for each material at the interaction point. If false, interaction data will only be sent for the primary material at the interaction point. More...
|
|
ImpactTriggerContactMode | ContactMode [get, set] |
| How collision contacts should be handled. More...
|
|
bool | HighPriority [get, set] |
| Should this trigger ignore the Physics Interactions Limit set in the Impact Manager? More...
|
|
A base class for implementing Impact Triggers. It is not necessary to inherit from this class when making your own trigger, but it contains methods and properties you might find useful.
- Template Parameters
-
◆ buildInteractionData()
◆ getImpactObject()
Attempts to retrieve an IImpactObject to send interaction data to. If MainTarget is set, MainTarget will be returned. Otherwise it will attempt to get the IImpactObject component from the given game object or one of its parents.
- Parameters
-
collider | The game object to use if MainTarget is null. |
- Returns
- The IImpactObject to send interaction data to, if one can be found.
◆ processCollision()
Takes the given IImpactCollisionWrapper and processes it based on the trigger settings. Override buildAndSendCollisionParameters to receive the built data and convert it to IInteractionData to send to an IImpactObject.
- Parameters
-
collision | The collision to process. |
◆ processCollisionContact()
Process a collision contact to get all material and velocity data. The material and velocity data will be sent to buildInteractionData, which you can override.
- Parameters
-
collision | The original collision data. |
contactPoint | The contact point of the collision to use in calculations. |
◆ processCollisionMultipleContacts()
Takes the given IImpactCollisionWrapper and processes all of it's contact points. Override buildAndSendCollisionParameters to receive the data and convert it to IInteractionData to send to an IImpactObject.
- Parameters
-
collision | The collision to process. |
◆ processCollisionSingleAveragedContact()
Takes the given IImpactCollisionWrapper and processes it for a single averaged contact. Override buildAndSendCollisionParameters to receive the data and convert it to IInteractionData to send to an IImpactObject.
- Parameters
-
collision | The collision to process. |
◆ processCollisionSingleContact()
Takes the given IImpactCollisionWrapper and processes it for a single contact only (the first contact). Override buildAndSendCollisionParameters to receive the data and convert it to IInteractionData to send to an IImpactObject.
- Parameters
-
collision | The collision to process. |
◆ ContactMode
◆ Enabled
Should this trigger process any collisions? You should use this instead of the normal enabled property because collision messages are still sent to disabled components.
Implements Impact.Triggers.IImpactTrigger.
◆ HighPriority
◆ MainTarget
◆ UseMaterialComposition
Should this trigger use the material composition of the objects it hits? If true, interaction data will be sent for each material at the interaction point. If false, interaction data will only be sent for the primary material at the interaction point.
Implements Impact.Triggers.IImpactTrigger.