mirror of
https://github.com/VRLabs/World-Constraint.git
synced 2026-06-05 23:26:23 +00:00
No description
|
|
||
|---|---|---|
| .github/workflows | ||
| Instancer | ||
| Media | ||
| .gitignore | ||
| Instancer.meta | ||
| LICENSE | ||
| LICENSE.meta | ||
| Media.meta | ||
| package.json | ||
| package.json.meta | ||
| README.md | ||
| README.md.meta | ||
| World Constraint.prefab | ||
| World Constraint.prefab.meta | ||
| World.prefab | ||
| World.prefab.meta | ||
World Constraint
A world-fixed object, held in place with a constraint
⬇️ Download Latest Version
📦 Add to VRChat Creator Companion
How it works
World ConstraintusesWorld.prefabfrom the assets as a parent constraint source.World.prefabis not in the scene, soWorld Constraintwill always stay at position 0, 0, 0.- The parent constraint on
ContainerusesReset Targetas a source, which is used to bringContainerto your avatar.
Install guide
https://github.com/VRLabs/World-Constraint/assets/76777936/464287a8-c43c-4cf0-bc6b-5ec700a3eb9b
- Drag & drop the
World Constraintprefab 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
Reset Target - Move
Reset Targetoutside ofWorld Constraintand place it anywhere in your avatars hierarchy as needed.
Note
When building for Quest, you will have to remove unsupported components and shaders
How to use
- Place the objects you want to leave in world space inside
World Constraint->Container.- Alternatively you can constrain the objects to
Container.
- Alternatively you can constrain the objects to
- Disable the
Containerparent constraint component to leave it in world space, and enable it to reset theContainertoReset Target.
Additional notes
- By default, the Container and its contents will not scale with your avatar. If you want the Container and its contents to scale with your avatar, add a Scale Constraint to the
Containerobject, set your avatar as the source, and activate it. - If your Reset Target is directly under your avatar, it won't properly rotate with you in full body.
Performance stats
Constraints: 3
Constraint Depth: 3
Hierarchy layout
World Constraint
|-Container
| |-Cube
|-Reset Target
Contributors
License
World Constraint is available as-is under MIT. For more information see LICENSE.