Collision Detection
Collision Detection
A contact system to detect world collision.
⬇️ Download Latest Version
📦 Add to VRChat Creator Companion
</div>How it works
- A particle dies on collision with colliders, causing contacts to stop contacting each other, causing a boolean to enable.
Install guide
https://github.com/VRLabs/Collision-Detection/assets/76777936/f9e0b70a-c5ff-43a6-a0ad-b7a3e49f3a63
- Merge the Animator Controller
Collision Detection FXto your own FX Controller, using the Avatars 3.0 Manager tool. - Drag & drop the
Collision Detectionprefab 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
[!NOTE]
When building for Quest, you will have to remove unsupported components and shaders
How to use
- 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
collisionmodule, or disable thecollisionmodule and enable thetriggersmodule 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/AlwaysResetis false, this bool is used to reset the IsColliding state.
Performance stats
Contact Senders: 1
Contact Receivers: 1
FX Animator Layers: 1
Particle Systems: 1
Hierarchy layout
Collision Detection
Contributors
License
Collision Detection is available as-is under MIT. For more information see LICENSE.
<div align="center"><img src="https://github.com/VRLabs/Resources/raw/main/Icons/VRLabs.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Discord.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Patreon.png" width="50" height="50"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Empty.png" width="10"> <img src="https://github.com/VRLabs/Resources/raw/main/Icons/Twitter.png" width="50" height="50">
</div>Keywords
No keywords found.Install via VCC
Package ID
dev.vrlabs.collision-detectionUnity Version
2022.3Unity Release
undefinedVRChat Version
undefined