Version: 2023.2
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.

See Also: Rigidbody2D.SlideMovement.useNoMove, Rigidbody2D.SlideMovement.useSimulationMove, Rigidbody2D.Slide and SlideMovement.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961