Restrict a body’s degrees of freedom along world axes.
Pass a list of Lock tokens to Physics.lock. Each entry
removes one degree of freedom from the body. The list fully describes the
body’s lock state — calling lock again with a different list replaces the
previous one. An empty list clears all locks.
Lock translation along the world X axis.
Lock translation along the world Y axis.
Lock translation along the world Z axis.
Lock rotation about the world X axis.
Lock rotation about the world Y axis.
Lock rotation about the world Z axis.
All three translation axes locked. The body cannot move.
All three rotation axes locked. The body cannot tip or spin. Useful for character capsules whose orientation is driven outside of physics.
A single degree of freedom to lock.