Version: Unity 6 Preview (6000.0)
LanguageEnglish
  • C#

Rigidbody2D.SlideResults.position

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
public Vector2 position;

Description

The position that was calculate as a target position to move to when performing a Rigidbody2D.Slide.

When a Rigidbody2D.Slide command is complete, this will be the position that both the Rigidbody2D.position and Transform.position are set to however, if Rigidbody2D.SlideMovement.useSimulationMove is enabled, then neither the Rigidbody2D.position and Transform.position will be changd upon return but a Rigidbody2D.MovePosition would have been called using this position. If Rigidbody2D.SlideMovement.useNoMove is enabled then no move is processed at all but is simply returned here.

Additional resources: Rigidbody2D.SlideMovement.useNoMove, Rigidbody2D.SlideMovement.useSimulationMove, Rigidbody2D.Slide and SlideMovement.