Skip to content

VRChat avatar package for detecting player or world collision

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

VRLabs/Collision-Detection

Repository files navigation

Collision Detection

Generic badge Generic badge Generic badge Generic badge Generic badge

Generic badge Generic badge

A contact system to detect world collision.

Collision


How it works

  • A particle dies on collision with colliders, causing contacts to stop contacting each other, causing a boolean to enable.

Install guide

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

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 collision module, or disable the collision module and enable the triggers module to select specific trigger colliders.

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: If CollisionDetection/AlwaysReset is 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.

About

VRChat avatar package for detecting player or world collision

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Packages

No packages published

Languages