Version: 2023.1
public Vector2 surfaceUp ;

描述

A reference direction used to calculate contact angles.

Both Rigidbody2D.SlideMovement.surfaceSlideAngle and Rigidbody2D.SlideMovement.gravitySlipAngle use this to determine the surface angle.

NOTE: By default, this value is Vector2.up. The magnitude of this vector is unimportant however an exception will be thrown in the magnitude is zero.

See Also: Rigidbody2D.Slide and SlideResults.