Rigidbody2D.SlideResults
The results of a slide movement performed with Rigidbody2D.Slide.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Struct
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
public struct Rigidbody2D.SlideResults
Remarks
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.
Additional Resources: Rigidbody2D.Slide and Rigidbody2D.SlideMovement.
Properties
Property | Description |
|---|---|
| iterationsUsed | Returns the number of iterations used when performing a Rigidbody2D.Slide. |
| position | The position that was calculate as a target position to move to when performing a Rigidbody2D.Slide. |
| remainingVelocity | Returns the remaining velocity that couldn't be used when performing a Rigidbody2D.Slide. |
| slideHit | The specific contact found when a slide movement is performed with Rigidbody2D.Slide. |
| surfaceHit | The specific contact found when a slide movement is performed with Rigidbody2D.Slide. |