Version: 5.3 (switch to 5.4b)
Friction Joint 2D
Relative Joint 2D

Hinge Joint 2D

Hinge Joint 2D или шарнирная петля это компонент, контролируемый физикой rigidbody, который позволяет присоединить Sprite к точке в пространстве, вокруг которой данный объект может вращаться. Вращение может быть пассивным (скажем, в ответ на столкновение) или активным, т.е. приведено в движение двигателем. Шарнирная петля также может быть настроена для предотвращения полного поворота тела.

Свойства

Свойство: Функция:
Enable Collision Могут ли два соединенных тела сталкиваться друг с другом?
Connected Rigid Body Specify here the other object this joint connects to. Leave this as None and the other end of the joint will be fixed at a point in space defined by the Connected Anchor setting. Select the circle to the right of the field to view a list of objects to connect to.
Auto Configure Connected Anchor Check this box to automatically set the anchor location for the other object this joint connects to. (Check this instead of completing the Connected Anchor fields.)
Anchor The place (in terms of X, Y co-ordinates on the RigidBody) where the end point of the joint connects to this object.
Connected Anchor The place (in terms of X, Y co-ordinates on the RigidBody) where the end point of the joint connects to the other object.
Motor
Use Motor Следует ли включить двигатель петли?
Motor Speed Целевая скорость двигателя (градусов/секунду).
Maximum Motor Force Максимальный крутящий момент двигателя пока возможно достигнуть целевой скорости.
Use Limits Следует ли ограничить угол поворота?
Angle Limits
Lower Angle Нижний конец дуги поворота в соответствии с ограничениями.
Upper Angle Верхний конец дуги поворота в соответствии с ограничениями.
Break Force Specify the linear (or straight line) force level needed to break and so delete the joint. Infinity means it is unbreakable.
Break Torque Specify the the angular (or rotation) level needed to break and so delete the joint. Infinity means it is unbreakable.

Детали

(See also Joints 2D: Details and Hints for useful background information on all 2D joints.)

Название шарнирная петля подразумевает что-то вроде дверной петли (и, конечное, это может быть использовано для реализации дверной петли), но это общее понятие, относящееся к чему угодно, что вращается вокруг конкретной точки. Это также может быть использовано для реализации деталей машины, движения колес, маятников и многих других схожих вещей.

You can use this joint to make two points overlap. Those two points can be two Rigidbody2D components or a Rigidbody2D component and a fixed position in the world. (Connect to a fixed position in the world by setting Connected Rigidbody to None). The joint applies a linear force to both connected rigid body objects.

The joint has a simulated rotational motor which you can turn on or off. Set the Maximum Motor Speed and Maximum Motor Force to control the angular speed (Torque), and make the two rigid body objects rotate in an arc relative to each other. Set the limits of the arc using Lower Angle and Upper Angle.

Hinge Joint 2D has three simultaneous constraints. All are optional:

  • Maintain a relative linear distance between two anchor points on two rigid body objects.
  • Maintain an angular speed between two anchor points on two rigid body objects (limited with a maximum torque in Maximum Motor Force .
  • Maintain an angle within a specified arc.

For Example:

You can use this joint to construct physical objects that need to react as if they are connected with a rotational pivot. Such as:

  • A see-saw pivot where the horizontal section is connected to the base. (Use the joint’s Angle Limits to simulate the highest and lowest point of the see-saw’s movement.)
  • A pair of scissors connected together with a hinge pivot. (You can use the joint’s Angle Limits to simulate the closing and maximum opening of the scisssors.)
  • A simple wheel connected to the body of a car with the pivot connecting the wheel at its center to the car. (In this example you can use the joint’s motor to rotate the wheel.)
Friction Joint 2D
Relative Joint 2D