Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


gravitySlipAngle

When the gravity movement causes a contact with a Collider2D, slippage maybe occur if the surface angle is greater than this angle.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public float gravitySlipAngle { readonly get; set; }

Remarks

Use this angle threshold to control whether slippage will occur on surface slopes above the threshold.
The angle is in degrees and is relative to the _surfaceUp vector.
NOTE: Slippage will only occur if no initial
velocity
is passed to the Rigidbody2D.Slide method. Slippage will always occur if _surfaceUp has zero magnitude.