Version: 2019.2
LanguageEnglish
  • C#

Joint2D.connectedBody

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 Rigidbody2D connectedBody;

Description

The Rigidbody2D object to which the other end of the joint is attached (ie, the object without the joint component).

If this property is set to null then the joint attaches to a fixed point in space rather than another Rigidbody2D.

Unity does not support connecting a joint to a Rigidbody2D in a different Scene that is using a local physics Scene. If a joint is connected to a Rigidbody2D, and then that Rigidbody2D is moved to a Scene that uses LocalPhysicsMode.Physics2D, then the joint is automatically disconnected from the Rigidbody2D.

See Also: Scene, LocalPhysicsMode, Rigidbody2D and collideConnected.

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