Impact Main Page API Reference Change Logs
Installation
Impact Tags Impact Tag Library Using Impact Tags
Impact Manager Material Mapping
Impact Materials Impact Material Interaction Sets
Impact Interactions Audio Interactions Particle Interactions Decal Interactions
Impact Objects Impact Object Single Material Impact Object Rigidbody Rigidbodies With Multiple Materials Impact Terrain
Impact Triggers Physics Triggers Impact Collision Trigger Impact Slide and Roll Trigger Impact Simple Collision Trigger Impact Speculative Collision Trigger Impact Particle Collision Trigger Other Triggers Impact Raycast Trigger
Extending Impact Custom Impact Triggers Interaction Data Custom Impact Interactions Impact Interactions Interaction Results IInteractionResult IContinuousInteractionResult Custom Impact Objects Custom Impact Materials Custom Impact Tag Libraries
FMOD Integration Setup FMOD Audio Interaction FMOD Parameters Notes

Impact Interactions

Impact Interactions are responsible for the specific behaviors that occur when an interaction happens. There are 3 kinds of interactions that come with Impact.


Audio Interactions

Audio Interactions are used to play sounds for interactions. You can create a new Audio Interaction by going to Assets > Create > Impact > Audio Interaction.

Audio Interactions can have a list of audio clips to play on collision. There are 2 modes that can be used to select the audio clips:

  • Velocity – Base the output audio clip on the input velocity. The velocity will be converted to a normalized (0 to 1) value based on the Velocity Range and Collision Normal Influence, and that value will be used to select the output audio clip. The first element corresponds to a value of 0 and the last element corresponds to a value of 1.
  • Random – Select a random audio clip from the list.

In addition to the collision audio clips, you can assign audio clips to Slide Audio and Roll Audio to use when the object is sliding or rolling. For best results, these sounds should be looped.

Finally, Audio Interactions require an Audio Source Template. The audio source properties of the template will be used when playing sounds.

Audio Interactions also have the following properties:

  • Velocity Range – Input velocities will be converted to a normalized (0 to 1) value based on this range and the Collision Normal Influence. The normalized value will then be used with the Scale Volume With Velocity property and the Velocity Audio Clip Selection Mode.
  • Collision Normal Influence – How much the input normal will effect the calculated intensity of the collision. This can be used so that grazing collisions will have a low volume even if they have a high velocity.
  • Scale Volume With Velocity – If checked, the output volume will be multiplied based on the input velocity. The value to multiply by comes from the Volume Scale Curve.
  • Pitch Randomness – A random multiplier for the output pitch.
  • Volume Randomness – A random multiplier for the output volume.
  • Slide Velocity Pitch Multiplier – Increases the pitch of sliding and rolling sounds based on the input velocity, so higher velocities will have a higher pitch. Typically this should be a very low value.

Particle Interactions

Particle Interactions are used to display particle effects for interactions. You can create a new Audio Interaction by going to Assets > Create > Impact > Particle Interaction.

Particle Interactions have the following properties:

  • Particle Prefab – The prefab for the particles that will be shown.
  • Is Particle Looped – Does the particle system loop? Looping particle systems can be useful for sliding and rolling particles.
  • Minimum Velocity – The minimum input velocity required for then particle effect to be shown.
  • Collision Normal Influence – How much the input normal will effect the calculated intensity of the collision.
  • Emit On Collision – Should particles be displayed for collisions?
  • Emit On Slide – Should particles be displayed when sliding?
  • Emit On Roll – Should particles be displayed when rolling?
  • Emission Interval – If a particle is not looped, but should be played on slide or roll, this is the interval between each emission while the object is sliding or rolling.
  • Interval Type – Whether the Emission Interval is based on time (seconds) or distance (units/meters).

The prefab used for Particle Interactions must have the Impact Particles component attached to it You can add this script to your prefab by going to Add Component > Impact > Impact Particles. You can also use a custom component that inherits from ImpactParticlesBase.

Impact Particles have a single property Pool Size, the size of the object pool created for this prefab. All particle systems attached to this object and its children will be automatically found.


Decal Interactions

Decal Interactions are used to place decals on surfaces for interactions. You can create a new Decal Interaction by going to Assets > Create > Impact > Decal Interaction.

Decal Interactions have the following properties:

  • Decal Prefab – The prefab for the decal that will be placed.
  • Minimum Velocity – The minimum input velocity required for then decal to be placed.
  • Collision Normal Influence – How much the input normal will effect the calculated intensity of the collision.
  • Create On Collision – Should decals be created for collisions?
  • Create On Slide – Should decals be created when sliding?
  • Create On Roll – Should decals be created when rolling?
  • Creation Interval – The interval between each decal while the object is sliding or rolling.
  • Interval Type – Whether the Creation Interval is based on time (seconds) or distance (units/meters).

The prefab used for Decal Interactions must have the Impact Decal component attached to it You can add this script to your prefab by going to Add Component > Impact > Impact Decal. You can also use a custom component that inherits from ImpactDecalBase.

Impact Decals have the following properties:

  • Pool Size – The size of the object pool for this decal.
  • Creation Interval – How far from the contact point the decal will be placed (along the contact normal). This is mainly useful if the decal uses Projectors.
  • Parent to Object – Should the decal be parented to the object it is placed on? You should check this if decals will be placed on dynamic objects, so that the decal will follow the object.