Impact CFX API 1.5.1
Comprehensive API documentation for Impact CFX - Collision Effects System
Loading...
Searching...
No Matches
ImpactCFX.ImpactRaycaster Class Reference

Convenience methods for triggering effects via raycasting. More...

Static Public Member Functions

static void QueueRaycast3D (RaycastHit raycastHit, Vector3 velocity, ImpactMaterialAuthoring impactMaterial, CollisionType collisionType, int raycastID, int hitObjectMaterialCount, GameObject sourceObject=default, ImpactTagMask fallbackTags=default)
 Queues an effect from a 3D raycast, playing an effect using the given Impact Material.
 
static void QueueRaycastInverted3D (RaycastHit raycastHit, Vector3 velocity, ImpactTagMask impactTagMask, CollisionType collisionType, int raycastID, int hitObjectMaterialCount, GameObject sourceObject=default, ImpactMaterialAuthoring fallbackMaterial=default)
 Queues an effect from a 3D raycast, playing an effect using the object that was hit by the raycast.
 
static void QueueRaycast2D (RaycastHit2D raycastHit, Vector2 velocity, ImpactMaterialAuthoring impactMaterial, CollisionType collisionType, int raycastID, int hitObjectMaterialCount, GameObject sourceObject=default)
 Queues an effect from a 2D raycast, playing an effect using the given Impact Material.
 
static void QueueRaycastInverted2D (RaycastHit2D raycastHit, Vector2 velocity, ImpactTagMask impactTagMask, CollisionType collisionType, int raycastID, int hitObjectMaterialCount, GameObject sourceObject=default)
 Queues an effect from a 2D raycast, playing an effect using the object that was hit.
 

Detailed Description

Convenience methods for triggering effects via raycasting.

Member Function Documentation

◆ QueueRaycast2D()

static void ImpactCFX.ImpactRaycaster.QueueRaycast2D ( RaycastHit2D  raycastHit,
Vector2  velocity,
ImpactMaterialAuthoring  impactMaterial,
CollisionType  collisionType,
int  raycastID,
int  hitObjectMaterialCount,
GameObject  sourceObject = default 
)
static

Queues an effect from a 2D raycast, playing an effect using the given Impact Material.

Parameters
raycastHitThe raycast hit produced by the raycast.
velocityThe velocity to assign to the raycast.
impactMaterialThe impact material to use for playing effects.
collisionTypeThe type of collision to assign to the raycast.
raycastIDAn identifier for the raycast. Only necessary if the collision type is slide or roll.
hitObjectMaterialCountThe number of materials to get for the object that was hit.
sourceObjectAn optional Game Object that the raycast is being sent from. This is treated as the "trigger" object.

◆ QueueRaycast3D()

static void ImpactCFX.ImpactRaycaster.QueueRaycast3D ( RaycastHit  raycastHit,
Vector3  velocity,
ImpactMaterialAuthoring  impactMaterial,
CollisionType  collisionType,
int  raycastID,
int  hitObjectMaterialCount,
GameObject  sourceObject = default,
ImpactTagMask  fallbackTags = default 
)
static

Queues an effect from a 3D raycast, playing an effect using the given Impact Material.

Parameters
raycastHitThe raycast hit produced by the raycast.
velocityThe velocity to assign to the raycast.
impactMaterialThe impact material to use for playing effects.
collisionTypeThe type of collision to assign to the raycast.
raycastIDAn identifier for the raycast. Only necessary if the collision type is slide or roll.
hitObjectMaterialCountThe number of materials to get for the object that was hit.
sourceObjectAn optional Game Object that the raycast is being sent from. This is treated as the "trigger" object.
fallbackTagsOptional fallback tags to use if no material can be found on the object hit by the raycast.

◆ QueueRaycastInverted2D()

static void ImpactCFX.ImpactRaycaster.QueueRaycastInverted2D ( RaycastHit2D  raycastHit,
Vector2  velocity,
ImpactTagMask  impactTagMask,
CollisionType  collisionType,
int  raycastID,
int  hitObjectMaterialCount,
GameObject  sourceObject = default 
)
static

Queues an effect from a 2D raycast, playing an effect using the object that was hit.

Parameters
raycastHitThe raycast hit produced by the raycast.
velocityThe velocity to assign to the raycast.
impactTagMaskThe impact tags to assign to the raycast.
collisionTypeThe type of collision to assign to the raycast.
raycastIDAn identifier for the raycast. Only necessary if the collision type is slide or roll.
hitObjectMaterialCountThe number of materials to get for the object that was hit.
sourceObjectAn optional Game Object that the raycast is being sent from. This is treated as the "hit" object.

◆ QueueRaycastInverted3D()

static void ImpactCFX.ImpactRaycaster.QueueRaycastInverted3D ( RaycastHit  raycastHit,
Vector3  velocity,
ImpactTagMask  impactTagMask,
CollisionType  collisionType,
int  raycastID,
int  hitObjectMaterialCount,
GameObject  sourceObject = default,
ImpactMaterialAuthoring  fallbackMaterial = default 
)
static

Queues an effect from a 3D raycast, playing an effect using the object that was hit by the raycast.

Parameters
raycastHitThe raycast hit produced by the raycast.
velocityThe velocity to assign to the raycast.
impactTagMaskThe impact tags to assign to the raycast.
collisionTypeThe type of collision to assign to the raycast.
raycastIDAn identifier for the raycast. Only necessary if the collision type is slide or roll.
hitObjectMaterialCountThe number of materials to get for the object that was hit.
sourceObjectAn optional Game Object that the raycast is being sent from. This is treated as the "hit" object.
fallbackMaterialAn optional fallback material to use if no material can be found on the object hit by the raycast.