Class CinemachineCollisionImpulseSource
Generate an Impulse Event when this object's Collider collides with something or its trigger zone is entered.
This component should be attached to a GameObject with a Collider or a Collider2D. Objects colliding with this (or entering its trigger zone if it's a trigger) will be filtered according to the layer and tag settings defined here, and if they pass the filter, they will cause an impulse event to be generated.
Use CinemachineImpulseSource.ImpulseDefinition to define the characteristics of the impulse.
Inheritance
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[AddComponentMenu("Cinemachine/Helpers/Cinemachine Collision Impulse Source")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineCollisionImpulseSource.html")]
public class CinemachineCollisionImpulseSource : CinemachineImpulseSource
Fields
IgnoreTag
No Impulse events will be generated for collisions with objects having these tags
Declaration
[Tooltip("No Impulse events will be generated for collisions with objects having these tags")]
[FormerlySerializedAs("m_IgnoreTag")]
public string IgnoreTag
Field Value
Type | Description |
---|---|
string |
LayerMask
Only collisions with objects on these layers will generate Impulse events.
Declaration
[Header("Trigger Object Filter")]
[Tooltip("Only collisions with objects on these layers will generate Impulse events")]
[FormerlySerializedAs("m_LayerMask")]
public LayerMask LayerMask
Field Value
Type | Description |
---|---|
LayerMask |
ScaleImpactWithMass
If checked, signal amplitude will be multiplied by the mass of the impacting object
Declaration
[Tooltip("If checked, signal amplitude will be multiplied by the mass of the impacting object")]
[FormerlySerializedAs("m_ScaleImpactWithMass")]
public bool ScaleImpactWithMass
Field Value
Type | Description |
---|---|
bool |
ScaleImpactWithSpeed
If checked, signal amplitude will be multiplied by the speed of the impacting object
Declaration
[Tooltip("If checked, signal amplitude will be multiplied by the speed of the impacting object")]
[FormerlySerializedAs("m_ScaleImpactWithSpeed")]
public bool ScaleImpactWithSpeed
Field Value
Type | Description |
---|---|
bool |
UseImpactDirection
If checked, signal direction will be affected by the direction of impact
Declaration
[Header("How To Generate The Impulse")]
[Tooltip("If checked, signal direction will be affected by the direction of impact")]
[FormerlySerializedAs("m_UseImpactDirection")]
public bool UseImpactDirection
Field Value
Type | Description |
---|---|
bool |