A constraint system to preserve offsets
- Constraints reference each other as sources and swap their enabled state to preserve offset transforms.
Offset.Constraint-11.mp4
- Merge the Animator Controller
Offset Constraint FX
to your own FX Controller, using the Avatars 3.0 Manager tool. - Drag & drop the
Offset 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
Offset Target
- Move
Offset Target
outside ofOffset 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
- Place the objects you want to to use inside
Offset Constraint
->Container
.- Alternatively you can constrain the objects to
Container
.
- Alternatively you can constrain the objects to
There are two bools in your FX Controller:
OffsetConstraint/Control
:- True: Places the
Container
in world space and allows the user to set the specified offset. - False: Constraints the
Container
to theOffset Target
with the specified offset.
- True: Places the
OffsetConstraint/Reset
moves theContainer
to theOffset Target
.
Constraints: 2
FX Animator Layers: 1
Offset Constraint
|-Container
| |-Cube
|-Root
| |-End
|-Offset Target
Offset Constraint is available as-is under MIT. For more information see LICENSE.