https://github.com/vrlabs/world-physics
World Constraint + Physics.
https://github.com/vrlabs/world-physics
Last synced: about 1 year ago
JSON representation
World Constraint + Physics.
- Host: GitHub
- URL: https://github.com/vrlabs/world-physics
- Owner: VRLabs
- License: mit
- Created: 2021-12-21T12:52:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-04T20:41:25.000Z (over 1 year ago)
- Last Synced: 2024-12-04T21:34:30.742Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 24.9 MB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# World Physics
[](https://github.com/VRLabs/World-Physics/releases/latest)
[](https://github.com/VRLabs/World-Physics/blob/main/LICENSE)
[](https://img.shields.io/badge/Quest-Incompatible-red?logo=Meta)
[](https://unity.com/releases/editor/whats-new/2022.3.22)
[](https://vrchat.com/home/download)
[](https://discord.vrlabs.dev/)
[](https://patreon.vrlabs.dev/)
Easy fix for Physics components behaving weirdly in world space

### ⬇️ [Download Latest Version](https://github.com/VRLabs/World-Physics/releases/latest)
### 📦 [Add to VRChat Creator Companion](https://vrlabs.dev/packages?package=dev.vrlabs.world-physics)
## How it works
* By turning off colliders on the mirror clone we can prevent them from colliding with the player.
* By using an animated fixed joint we can prevent incorrect movement of rigidbodies under world constraints for remote players.
## Install guide
https://github.com/VRLabs/World-Physics/assets/76777936/670ed186-a9b0-45af-8f54-a1adb4ec8541
* Merge the Animator Controller ``World Physics FX`` to your own FX Controller, using the [Avatars 3.0 Manager](https://github.com/VRLabs/Avatars-3.0-Manager) tool.
* Drag & drop the ``World Physics`` prefab into the base of your Hierarchy.
* Right click and unpack the prefab, then drag & drop it onto your avatar.
* Expand the prefab hierarchy and find ``World Physics Target``
* Move ``World Physics Target`` outside of ``World Physics`` and place it anywhere in your avatars hierarchy as needed.
* For the demo, lift the ``World Physics Target`` position on the Y axis, so there is room for the cube to fall.
## How to use
* This package is intended for leaning how these fixes work so you can apply them to your own systems. It is set up for a physics demo where cube falls and collides with the world.
* Unity physics are complex and making things work as you intend beyond these fixes is your responsibility.
## Performance stats
```c++
Colliders: 1
Constraints: 2
Constraint Depth: 2
FX Animator Layers: 2
Rigidbodies: 2
```
## Hierarchy layout
```html
World Physics
|-Rigidbody
| |-Collider
| |-Cube
|-World Physics Target
```
## Contributors
* [lin](https://github.com/oofdesu)
## License
World Physics is available as-is under MIT. For more information see [LICENSE](https://github.com/VRLabs/World-Physics/blob/main/LICENSE).
[
](https://vrlabs.dev "VRLabs")
[
](https://discord.vrlabs.dev/ "VRLabs")
[
](https://patreon.vrlabs.dev/ "VRLabs")
[
](https://twitter.com/vrlabsdev "VRLabs")