A contact system to detect world collision.
- A particle dies on collision with colliders, causing contacts to stop contacting each other, causing a boolean to enable.
2024-04-04.22-50-34-1.mp4
- Merge the Animator Controller
Collision Detection FX
to your own FX Controller, using the Avatars 3.0 Manager tool. - Drag & drop the
Collision Detection
prefab into the base of your Hierarchy. - Right click and unpack the prefab, then drag & drop it onto your avatar.
- Parent Constrain it to any object in your avatars hierarchy as needed.
- Note: You can move the object as well, but you'd have to repath the animations. One tool for this is hfcred's Animation Repathing tool
- After parent constraining/moving the object as needed, you can scale the object to obtain the desired range.
- Note: To change the collision requirements, you can change the Layers in the
collision
module, or disable thecollision
module and enable thetriggers
module to select specific trigger colliders.
- Note: To change the collision requirements, you can change the Layers in the
There are three important bools in your FX Controller:
CollisionDetection/IsColliding
: Whether or not the component is currently colliding with a collider.CollisionDetection/AlwaysReset
: Whether or not IsColliding should go to false immediately after stopping collision, or stay on until the Reset bool is enabled.CollisionDetection/Reset
: IfCollisionDetection/AlwaysReset
is false, this bool is used to reset the IsColliding state.
Contact Senders: 1
Contact Receivers: 1
FX Animator Layers: 1
Particle Systems: 1
Collision Detection
Collision Detection is available as-is under MIT. For more information see LICENSE.