mirror of
https://github.com/VRLabs/Collision-Detection.git
synced 2026-06-06 00:46:28 +00:00
No description
|
|
||
|---|---|---|
| .github/workflows | ||
| Instancer | ||
| Media | ||
| Resources | ||
| .gitignore | ||
| Collision Detection FX.controller | ||
| Collision Detection FX.controller.meta | ||
| Collision Detection.prefab | ||
| Collision Detection.prefab.meta | ||
| Instancer.meta | ||
| LICENSE | ||
| LICENSE.meta | ||
| Media.meta | ||
| package.json | ||
| package.json.meta | ||
| README.md | ||
| README.md.meta | ||
| Resources.meta | ||
Collision Detection
A contact system to detect world collision.
⬇️ Download Latest Version
📦 Add to VRChat Creator Companion
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.