autoAxis
When set, both local anchor frame rotations are recomputed at create so the slide axis is the direction from anchor A to anchor B, preserving the bodies' relative rotation.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public bool autoAxis { readonly get; set; }
Remarks
It is measured after any _autoAnchorA/_autoAnchorB resolution, so it reflects the anchors actually used. It is applied at create only; the authored anchor rotations are ignored while this is set. Anchors that coincide in world space (an auto anchor places them together) have no direction, so the world X axis is used.