Version: 2023.1
LanguageEnglish
  • C#

SlideResults

struct in UnityEngine

/

Implemented in:UnityEngine.Physics2DModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

The results of a slide movement performed with Rigidbody2D.Slide.

These results can be used to both tune movement configuration and to implement further logic to react to the specific surfaces encountered when a slide occurs.

NOTE: This struct can be used in the Unity Inspector for display purposes.

See Also: Rigidbody2D.Slide and SlideMovement.

Properties

iterationsUsedReturns the number of iterations used when performing a Rigidbody2D.Slide.
positionThe position that was calculate as a target position to move to when performing a Rigidbody2D.Slide.
remainingVelocityReturns the remaining velocity that couldn't be used when performing a Rigidbody2D.Slide.
slideHitThe specific contact found when a slide movement is performed with Rigidbody2D.Slide.
surfaceHitThe specific contact found when a slide movement is performed with Rigidbody2D.Slide.