0
\$\begingroup\$

Even after reading the documentation, I just can't figure out what the parameter does.
I experimented in Unity and set different parameters for Position At Rest and Position Offset. I succeeded in this anyway - both when Lock = false, and when Lock = true.

So what does the Lock affect?
enter image description here

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

This is covered in the documentation:

Toggle to let the Constraint move the GameObject. Uncheck this property to edit the position of this GameObject. You can also edit the Position At Rest and Position Offset properties. If Is Active is checked, the Constraint updates the At Rest or Offset properties for you as you move the GameObject or its Source GameObjects. When you are satisfied with your changes, check Lock to let the Constraint control this GameObject. This property has no effect in Play Mode.

You might have been testing with the "Is Active" toggle in the wrong state to see this in action. Here's the four combinations of behaviour you can observe with a quick test:

Is Active ✅ Is Active ❌
Lock ✅ You cannot move this object on its frozen position axes with its transform inspector or transform gizmo.

If you move the source objects, this object will move to follow along its frozen position axes.

Editing the Position at Rest and Offset properties is disabled in the inspector.
You can move this object, but re-enabling "Is Active" will make it snap back to its position according to this constraint's properties.

If you move the source objects, this object will stay where it is until "Is Active" is enabled.

Editing the Position at Rest and Offset properties is disabled in the inspector.
Lock ❌ You can move this object on its frozen position axes with its transform inspector or transform gizmo.

If you move the source objects, this object will stay where it is.

Editing the Position at Rest and Offset properties is enabled in the inspector. These properties will also automatically update if you move the object or its source objects to match, so that it retains its current position if "Lock" is re-enabled.
You can move this object on its frozen position axes with its transform inspector or transform gizmo.

If you move the source objects, this object will stay where it is.

Editing the Position at Rest and Offset properties is enabled in the inspector. These properties will not automatically update.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .