A legacy method for animating on particle death that uses the Layer Weight Tool
This package is depreated! If you want to drive a parameter on world or player collision, get the new package here
- The
Particle Driver Stay Active.controller
continuously enablesParticle System
to re-enable the particle system immediately after it's been disabled. - The
Particle System
object is disabled on collision via Stop Action. When re-enabled, theParticle Driver Weight.controller
will reset. Weight.controller
uses Animator Layer Control to change the weight of theParticle Driver
layer based on its weight.- The
ParticleDeath
parameter value is multiplied by the weight and can be used as a transition condition.
Particle.Driver-12.mp4
- Merge the Animator Controller
Particle Driver FX
to your own FX Controller, using the Avatars 3.0 Manager tool. - Drag & drop the
Particle Driver
prefab into the base of your Hierarchy. - Right click and unpack the prefab, then drag & drop it onto your avatar.
- Adjust the transforms of
Particle System
andCollider
as needed. - In the
Resources/Animations/Particle Driver Weight
controller, in theMax Weight
andMin Weight
animation state, change theIndex
to the index of theParticle Driver
Layer on your FX Controller- The top layer is index 0, the second layer is index 1, etc.
- When the Collider is colliding with the Particle, the
ParticleDriver/IsColliding
parameter will be set toTrue
, otherwise, it will be set toFalse
.
Colliders: 1
Particle Systems: 1
FX Animator Layers: 1
Sub Animators: 2
Particle Driver
|-Particle System
|-Collider
Particle Driver is available as-is under MIT. For more information see LICENSE.
โ