Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


FrictionJoint2D

Applies both force and torque to reduce both the linear and angular velocities to zero.
Read time 7 minutesLast updated 2 days ago

Definition

public sealed class FrictionJoint2D : AnchoredJoint2D

Remarks

The joint constantly tries to reduce both the ::Rigidbody2D::velocity and ::Rigidbody2D::angularVelocity to zero. Unlike contact friction which requires two colliders to be in contact, force and torque here are applied continuously.
You can control both the maximum force using _maxForce and maximum torque using _maxTorque. Because you can use very high force or torque limits, you can essentially reduce an objects movement to almost zero.
A typical usage for this joint might be to simulate top-down surface friction or to simulate stiff rotation of an object.

Properties

Property

Description

maxForceThe maximum force that can be generated when trying to maintain the friction joint constraint.
maxTorqueThe maximum torque that can be generated when trying to maintain the friction joint constraint.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.