logoRemuria

World Constraint

1.2.5 Public
<div align="center">

World Constraint

Generic badge Generic badge Generic badge Generic badge Generic badge

Generic badge Generic badge

A world-fixed object, held in place with a constraint

WorldConstraint

⬇️ Download Latest Version

📦 Add to VRChat Creator Companion

</div>

How it works

  • World Constraint uses World.prefab from the assets as a parent constraint source. World.prefab is not in the scene, so World Constraint will always stay at position 0, 0, 0.
  • The parent constraint on Container uses Reset Target as a source, which is used to bring Container to your avatar.

Install guide

https://github.com/VRLabs/World-Constraint/assets/76777936/464287a8-c43c-4cf0-bc6b-5ec700a3eb9b

  • Drag & drop the World Constraint 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 Reset Target
  • Move Reset Target outside of World Constraint and 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.
  • Disable the Container parent constraint component to leave it in world space, and enable it to reset the Container to Reset 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 Container object, 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.

<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.world-constraint

Unity Version

2022.3

Unity Release

undefined

VRChat Version

undefined

Author

License

MIT

Documentation URL

undefined

Changelog URL

undefined