The Friction Joint 2D connects objects controlled by rigidbody physics. The joint reduces both the linear and angular velocities between the objects to zero (ie, it slows them down). You can use this joint to simulate top-down friction, for example.
Propiedad: | Función: |
---|---|
Enable Collision | Can the two connected objects collide with each other? Check the box for yes. |
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. |
Max Force | Sets the linear (or straight line) movement between joined objects - a high value resists the linear movement between objects. |
Max Torque | Sets the angular (or rotation) movement between joined objects - a high value resists the rotation movement between objects. |
Break Force | Specify the force level needed to break and so delete the joint. Infinity means it is unbreakable. |
Break Torque | Specify the torque 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.)
Use this joint to slow down movement between two points to a stop. The joint’s aim is to maintain a zero relative linear and angular offset between two points. 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 linear force (Force) and angle force (Torque) to both rigid body points. It uses a simulated motor that is pre-configured to have a low motor power (and so, low resistence). You can change the resistance to make it weaker or stronger.
Strong Resistance:
A high (1,000,000 is the highest) Max Force == strong linear resistance and the rigid body objects won’t move in a line relative to each other very much.
A high (1,000,000 is the highest) Max Torque == strong angular resistance and the rigid body objects won’t move at an angle relative to each each other very much.
Weak Resistance:
A low Max Force == weak linear resistance and the rigid body objects move easily in a line relative to each other.
A low Max Torque == weak angular resistance and the rigid body objects move easily at an angle relative to each each other.
Friction Joint 2D, then, has two simultaneous constraints:
For Example:
You can use this joint to construct physical objects that need to react as if they have friction. They can resist either linear movement or angular movement, or both linear and angular movement. Such as: