Impact Interaction System API
Impact.Triggers.ImpactRaycastTrigger Class Reference

Helper class for handling interactions based on raycasts. More...

Static Public Member Functions

static void Trigger (ImpactTagMask tagMask, RaycastHit hit, Vector3 velocity, GameObject fromObject, int interactionType, bool useMaterialComposition)
 Trigger an interaction from a raycast. The interaction will be processed on the object that was hit by the raycast. More...
 
static void Trigger< T > (T interactionData, RaycastHit hit, bool useMaterialComposition)
 Trigger an interaction from a raycast. The interaction will be processed on the object that was hit by the raycast. More...
 
static void Trigger2D (ImpactTagMask tagMask, RaycastHit2D hit, Vector3 velocity, GameObject fromObject, int interactionType, bool useMaterialComposition)
 Trigger an interaction from a 2D raycast. The interaction will be processed on the object that was hit by the raycast. More...
 
static void Trigger2D< T > (T interactionData, RaycastHit2D hit, bool useMaterialComposition)
 Trigger an interaction from a 2D raycast. The interaction will be processed on the object that was hit by the raycast. More...
 
static void Trigger< T > (T interactionData, IImpactObject otherObject, int otherObjectPhysicsMaterialID, bool useMaterialComposition)
 Trigger an interaction. This will trigger an interaction on the object that was hit. Useful for things like bullets or footsteps. More...
 
static void Trigger (IImpactObject impactObject, RaycastHit hit, Vector3 velocity, int interactionType, bool useMaterialComposition)
 Trigger an interaction from a raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject. More...
 
static void Trigger< T > (T interactionData, RaycastHit hit, IImpactObject impactObject, bool useMaterialComposition)
 Trigger an interaction from a raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject. More...
 
static void Trigger2D (IImpactObject impactObject, RaycastHit2D hit, Vector3 velocity, int interactionType, bool useMaterialComposition)
 Trigger an interaction from a 2D raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject. More...
 
static void Trigger2D< T > (T interactionData, RaycastHit2D hit, IImpactObject impactObject, bool useMaterialComposition)
 Trigger an interaction from a 2D raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject. More...
 
static void Trigger< T > (T interactionData, IImpactObject sourceObject, IImpactObject otherObject, int otherObjectPhysicsMaterialID, bool useMaterialComposition)
 Trigger an interaction. This will trigger an interaction for the source object. More...
 

Detailed Description

Helper class for handling interactions based on raycasts.

Member Function Documentation

◆ Trigger() [1/2]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger ( IImpactObject  impactObject,
RaycastHit  hit,
Vector3  velocity,
int  interactionType,
bool  useMaterialComposition 
)
static

Trigger an interaction from a raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject.

Parameters
hitRaycast hit data. The contact point, normal, and the object that was hit will be retrived from this.
impactObjectThe Impact Object the resulting interaction will be processed on.
velocityThe velocity of the interaction.
interactionTypeThe type of interaction.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?

◆ Trigger() [2/2]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger ( ImpactTagMask  tagMask,
RaycastHit  hit,
Vector3  velocity,
GameObject  fromObject,
int  interactionType,
bool  useMaterialComposition 
)
static

Trigger an interaction from a raycast. The interaction will be processed on the object that was hit by the raycast.

Parameters
hitRaycast hit data. The contact point, normal, and the object that was hit will be retrived from this.
tagMaskThe tag mask to use for the interaction.
velocityThe velocity of the interaction.
fromObjectThe object the interaction is originating from.
interactionTypeThe type of interaction.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?

◆ Trigger2D() [1/2]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger2D ( IImpactObject  impactObject,
RaycastHit2D  hit,
Vector3  velocity,
int  interactionType,
bool  useMaterialComposition 
)
static

Trigger an interaction from a 2D raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject.

Parameters
hitRaycast 2D hit data. The contact point, normal, and the object that was hit will be retrived from this.
impactObjectThe Impact Object the resulting interaction will be processed on.
velocityThe velocity of the interaction.
interactionTypeThe type of interaction.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?

◆ Trigger2D() [2/2]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger2D ( ImpactTagMask  tagMask,
RaycastHit2D  hit,
Vector3  velocity,
GameObject  fromObject,
int  interactionType,
bool  useMaterialComposition 
)
static

Trigger an interaction from a 2D raycast. The interaction will be processed on the object that was hit by the raycast.

Parameters
hitRaycast 2D hit data. The contact point, normal, and the object that was hit will be retrived from this.
tagMaskThe tag mask to use for the interaction.
velocityThe velocity of the interaction.
fromObjectThe object the interaction is originating from.
interactionTypeThe type of interaction.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?

◆ Trigger2D< T >() [1/2]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger2D< T > ( interactionData,
RaycastHit2D  hit,
bool  useMaterialComposition 
)
static

Trigger an interaction from a 2D raycast. The interaction will be processed on the object that was hit by the raycast.

Parameters
hitRaycast 2D hit data. The contact point, normal, and the object that was hit will be retrived from this.
interactionDataThe original interaction data. Velocity, TagMask, ThisObject, and InteractionType should already be set.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?
Type Constraints
T :IInteractionData 

◆ Trigger2D< T >() [2/2]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger2D< T > ( interactionData,
RaycastHit2D  hit,
IImpactObject  impactObject,
bool  useMaterialComposition 
)
static

Trigger an interaction from a 2D raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject.

Parameters
hitRaycast 2D hit data. The contact point, normal, and the object that was hit will be retrived from this.
interactionDataThe original interaction data. Velocity, ThisObject, and InteractionType should already be set.
impactObjectThe IImpactObject that will process the interaction.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?
Type Constraints
T :IInteractionData 

◆ Trigger< T >() [1/4]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger< T > ( interactionData,
IImpactObject  otherObject,
int  otherObjectPhysicsMaterialID,
bool  useMaterialComposition 
)
static

Trigger an interaction. This will trigger an interaction on the object that was hit. Useful for things like bullets or footsteps.

Parameters
interactionDataThe fully populated interaction data.
otherObjectThe object that was hit.
otherObjectPhysicsMaterialIDThe instance ID of the physics material of the hit object. This can be 0 if unknown.
useMaterialCompositionShould this trigger use the material composition of the object that was hit?
Type Constraints
T :IInteractionData 

◆ Trigger< T >() [2/4]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger< T > ( interactionData,
IImpactObject  sourceObject,
IImpactObject  otherObject,
int  otherObjectPhysicsMaterialID,
bool  useMaterialComposition 
)
static

Trigger an interaction. This will trigger an interaction for the source object.

Parameters
interactionDataThe fully populated interaction data.
sourceObjectThe object the interaction originated from.
otherObjectThe object that was hit.
otherObjectPhysicsMaterialIDThe instance ID of the physics material of the hit object. This can be 0 if unknown.
useMaterialCompositionShould this trigger use the material composition of the object that was hit?
Type Constraints
T :IInteractionData 

◆ Trigger< T >() [3/4]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger< T > ( interactionData,
RaycastHit  hit,
bool  useMaterialComposition 
)
static

Trigger an interaction from a raycast. The interaction will be processed on the object that was hit by the raycast.

Parameters
hitRaycast hit data. The contact point, normal, and the object that was hit will be retrived from this.
interactionDataThe original interaction data. Velocity, TagMask, ThisObject, and InteractionType should already be set.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?
Type Constraints
T :IInteractionData 

◆ Trigger< T >() [4/4]

static void Impact.Triggers.ImpactRaycastTrigger.Trigger< T > ( interactionData,
RaycastHit  hit,
IImpactObject  impactObject,
bool  useMaterialComposition 
)
static

Trigger an interaction from a raycast. Impact Material data will be retrieved from the object that was hit by the raycast. The interaction will be processed using the given IImpactObject.

Parameters
hitRaycast hit data. The contact point, normal, and the object that was hit will be retrived from this.
interactionDataThe original interaction data. Velocity, ThisObject, and InteractionType should already be set.
impactObjectThe IImpactObject that will process the interaction.
useMaterialCompositionShould this trigger use the material composition of the object it hit by the raycast?
Type Constraints
T :IInteractionData