Legacy Documentation: Version 5.2
Distance Joint 2D
Slider Joint 2D

Hinge Joint 2D

Switch to Scripting

The Hinge Joint 2D component allows a Sprite object controlled by rigidbody physics to be attached to a point in space around which it can rotate. The rotation can be left to happen passively (in response to a collision, say) or actively powered by a motor torque provided by the joint itself. The hinge can also be set up with limits to prevent it from making a full rotation.

Properties

Property: Function:
Collide Connected Can the two connected objects collide with each other?
Connected Rigidbody The other Rigidbody2D object that the one with the joint is connected to. If this is null then the other end of the joint will be fixed at a point in space.
Anchor Coordinate in local space where the end point of the joint is attached.
Connected Anchor Coordinate in the other object’s local space where its end of the joint is attached.
Use Motor Should the hinge motor be enabled?
Motor Speed Target motor speed (degrees/sec).
Maximum Motor Force The maximum torque the motor can apply while attempting to reach the target speed.
Use Limits Should the rotation angle be limited?
Lower Angle The lower end of the rotation arc allowed by the limit.
Upper Angle The upper end of the rotation arc allowed by the limit.

Details

The hinge joint’s name implies something like a door hinge (and it can certainly be used to implement that) but it refers more generally to anything that rotates around a particular point. It can be used for machine parts, powered wheels, pendulums and many other similar things.

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