Unity basic physics system hinge joint Hinge Joint

       A hinge joint is a connection in a simulated physical system that allows two objects to rotate around a common pivot point. This connection can be used to simulate various physical movements of doors, pendulum clocks, robotic arms, and more.

Connected Body : This is another rigid body connected by the hinge joint. By setting this property, you can specify other objects connected to the current object.

Anchor : An anchor is a point on a rigid body connected to a hinge joint. It defines the position in local space relative to the rigidbody. The axis of rotation of the hinge joint will be passed through the anchor point.

Axis : The axis of rotation defines the direction around which to rotate. It is a three-dimensional vector, usually a unit vector in world space. By setting the rotation axis, you can control the rotation direction of the hinge joint.

Use Limits : This property determines whether the joint's limits are enabled. If enabled, you can set a minimum angle and a maximum angle to limit the range of rotation of the hinge joint.

Limits : When limits are enabled, you can set the range of rotation for the hinge joint. The minimum and maximum angles define the range of angles the hinge joint is allowed to rotate.

Use Motor : Hinge joints can use motors to apply rotational force. This property determines whether the motor is enabled.

Motor : If motor is enabled, you can set the rotation speed and rotation force. Rotation Velocity defines the target velocity at which the hinge joint will rotate, while Rotation Force defines the amount of force applied to the joint.

Use Spring : You can use the Spring property to simulate the elasticity of the hinge joint. By enabling this property, you can set the stiffness and damping of the spring.

Spring : If Spring is enabled, you can set the stiffness and damping of the spring. Stiffness defines how stiff the spring is, while damping defines the damping ratio of the spring. 

By setting and adjusting these parameters, you can control the behavior of the hinge joint according to your needs. These parameters allow you to limit the range of rotation, apply forces, and simulate effects such as elasticity. Understanding what these parameters do can help you better achieve the desired physics with hinge joints in Unity.

Guess you like

Origin blog.csdn.net/qq_36592993/article/details/131661950
Recommended