Version: Unity 6.1 Alpha (6000.1)
LanguageEnglish
  • C#

Rigidbody2D.SlideMovement.useNoMove

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

public bool useNoMove;

Description

Controls if any Rigidbody2D movement will happen or not.

When a slide movement is complete, a new Rigidbody2D position has been calculated, however it may be preferred to not perform the movement of the Rigidbody2D at all.

When this is enabled, no movement will occur. The Rigidbody2D.SlideResults.position always returns the calculated position so that can be used to move the Rigidbody2D.

NOTE: If this is enabled then a Rigidbody2D.SlideMovement.useSimulationMove cannot be used and should be disabled.

Additional resources: Rigidbody2D.SlideResults.position, Rigidbody2D.Slide and SlideResults.