Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


autoAxis

When set, local anchor frame A's rotation is recomputed at create so the slide axis is the direction from anchor A to anchor B.
Read time 1 minuteLast updated 10 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 _localAnchorA rotation is 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.