Impact Interaction System API
Impact.Triggers.ImpactCollisionTriggerBase< TCollision, TContact > Class Template Reference
Inheritance diagram for Impact.Triggers.ImpactCollisionTriggerBase< TCollision, TContact >:
Impact.Triggers.ImpactTriggerBase< TCollision, TContact > Impact.Triggers.IImpactTrigger Impact.Triggers.ImpactSpeculativeCollisionTriggerBase< TCollision, TContact >

Protected Member Functions

override 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...
 
- Protected Member Functions inherited from Impact.Triggers.ImpactTriggerBase< TCollision, TContact >
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...
 
ImpactTagMaskgetOtherObjectTagMask (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)
 

Additional Inherited Members

- Properties inherited from Impact.Triggers.ImpactTriggerBase< TCollision, TContact >
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...
 
- Properties inherited from Impact.Triggers.IImpactTrigger
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...
 
- Events inherited from Impact.Triggers.ImpactTriggerBase< TCollision, TContact >
Action< InteractionData, IImpactObjectOnTriggered
 Invoked when triggered. Sends the Interaction Data and the Impact Object that was triggered.
 

Member Function Documentation

◆ buildInteractionData()

override void Impact.Triggers.ImpactCollisionTriggerBase< TCollision, TContact >.buildInteractionData ( IImpactObject  target,
TCollision  collision,
TContact  contactPoint,
VelocityData  myVelocityData,
VelocityData  otherVelocityData,
ImpactTagMask tagMask,
float  compositionValue 
)
protectedvirtual

Called by the process methods to build IInteractionData. Override this if your custom triggers are using any of the process methods.

Parameters
targetThe target IImpactObject to send data to. You do not necessarily have to send data to this object.
collisionThe collision being processed.
contactPointThe collision contact point.
myVelocityDataThe velocity data of this object.
otherVelocityDataThe velocity data of the object being collided with.
tagMaskThe tag mask obtained from the other object. Can be null.
compositionValueThe material composition value.

Reimplemented from Impact.Triggers.ImpactTriggerBase< TCollision, TContact >.