PhysX Revolute Joint Component
The PhysX revolute joint component is a joint that links two actors such that they can only rotate around one axis relative to each other.
How far the joined objects can rotate can be limited, either with a hard limit that prevents the actor from rotating farther, or with a soft limit, which pulls the actor back with a spring.
The revolute joint can also be powered with a drive, meaning it will rotate on its own with a maximum force.
Component Properties
LimitMode
: Defines whether the joint can spin freely, or is restricted byLowerLimit
andUpperLimit
.NoLimit
: The joint can spin without restriction.HardLimit
: The joint cannot rotate farther thanLowerLimit
andUpperLimit
. If it hits the boundary, it may bounce back. In this modeSpringStiffness
acts as a restitution value ([0; 1]
range). At value zero, it will stop dead, with higher values, the actor will bounce back.SpringDamping
defines a force threshold. If the joint hits the limit with less force than this, it will not bounce back, at all.SoftLimit
: The joint can spin freely, but when it rotates farther than the limits, a spring will pull it back. In this modeSpringStiffness
([0; inf]
range) specifies how strongly the spring will pull, andSpringDamping
is used to dampen the spring to prevent oscilation.
LowerLimit
,UpperLimit
: The lower and upper allowed rotation angles, ifLimitMode
is enabled.SpringStiffness
,SpringDamping
: SeeLimitMode
.DriveMode
: Specifies whether the joint will apply a constant force to rotate the actors.NoDrive
: The joint will not rotate on its own.DriveAndSpin
: The joint will try to rotate atDriveVelocity
. If an external force makes it spin even faster, the joint will not brake.DriveAndBrake
: The joint will try to rotate andDriveVelocity
. If an external force makes it spin even faster, it will brake to try to not exceed the velocity.
DriveVelocity
: The target velocity to spin at, whenDriveMode
is enabled.MaxDriveTorque
: The maximum force the joint can apply to try to reachDriveVelocity
. If something blocks the joined actor, the torque affects whether the obstacle can be pushed away.