기술 자료

Unity Engine


User Manual

Script Reference

Unity Engine


Configurable Joint component reference

Property reference for the Configurable Joint component.
읽는 시간 10분최근 업데이트: 25일 전

Configurable Joints incorporate all the functionality of the other joint types and provide greater control of character movement. They are particularly useful when you want to customize the movement of a ragdoll and enforce certain poses on your characters. You can also use them to adapt joints into highly specialized joints of your own design.

Properties

Property

Description

Edit Angular LimitsAdds a visual gizmo to the Scene view that helps you edit joint angular limits. To use this gizmo, set the Angular X, Y, Z Motion to Limited and then handles appear for you to drag and adjust the joint's rotational space.
Connected BodyThe Rigidbody object which the joint connects to. You can set this to None to indicate that the joint attaches to a fixed position in space rather than another Rigidbody.
Connected Articulation BodyOptional reference to the ArticulationBody that the joint is dependent upon. If not set, the joint connects to the world.
AnchorThe point which defines the center of the joint. All physics-based simulations use this point as the center in calculations.
AxisThe local axis that defines the object's natural rotation based on physics simulation.
Auto Configure Connected AnchorEnable this setting to automatically calculate the Connected Anchor position to match the global position of the anchor property. This is the default setting. Disable it to configure the position of the connected anchor manually.
Connected AnchorManually configure the connected anchor position.
Secondary AxisThe Axis and Secondary Axis define the local coordinate system of the joint. The third axis is orthogonal to the other two.
X, Y, Z MotionSet the movement along the X, Y or Z axes to be Free, completely Locked, or Limited according to the limit properties described below.
Angular X, Y, Z MotionSet the rotation around the X, Y or Z axes to be Free, completely Locked, or Limited according to the limit properties described below.
Linear Limit SpringApply a spring force to pull the object back when it goes past the limit position:
  • Spring: The spring force. Set this value to zero to make the limit impassable. A value other than zero makes the limit elastic.
  • Damper: The reduction of the spring force in proportion to the speed of the joint's movement. Set a value above zero to allow the joint to "dampen" oscillations which would otherwise carry on indefinitely.
Linear LimitSet a limit on the joint's linear movement (that is, movement over distance rather than rotation), specified as a distance from the joint's origin:
  • Limit: The distance in world units from the origin to the limit.
  • Bounciness: Set a bounce force to apply to the object to push it back when it reaches the limit distance.
  • Contact Distance: The minimum distance tolerance between the joint position and the limit to enforce the limit. A high tolerance means the object is less likely to break past the limit when moving fast. However, this requires the physics simulation to consider the limit more often, which reduces performance slightly.
Angular X Limit SpringApply a spring torque to rotate the object back when it goes past the limit angle of the joint:
  • Spring: The spring torque. Set this value to zero to make the limit impassable. Set a value other than zero to make the limit elastic.
  • Damper: The reduction of the spring torque in proportion to the speed of the joint's rotation. Set a value above zero to allow the joint to "dampen" oscillations which would otherwise carry on indefinitely.
Low Angular X LimitLower limit on the joint's rotation around the x-axis, specified as an angle from the joint's original rotation:
  • Limit: The limit angle.
  • Bounciness: Set a bounce torque to apply to the object when its rotation reaches the limit angle.
  • Contact Distance: The minimum angular tolerance (between the joint angle and the limit) at which the limit is enforced. A high tolerance violates the limit less often when the object is moving fast. However, this requires the physics simulation to consider the limit more often and reduces performance slightly.
High Angular XLimitThis is similar to the Low Angular X Limit property described above but it determines the upper angular limit of the joint's rotation rather than the lower limit.
Angular YZ Limit SpringThis is similar to the Angular X Limit Spring described above but applies to rotation around both the Y and Z axes.
Angular Y LimitThis is similar to the Angular X Limit property described above but applies the limit to the y-axis and regards both the upper and lower angular limits as the same.
Angular Z LimitThis is similar to the Angular X Limit property described above but applies the limit to the z-axis and regards both the upper and lower angular limits as the same.
Target PositionThe target position that the joint's drive force moves to.
Target VelocityThe desired velocity that the joint moves to the Target Position under the drive force.
X DriveSet the force that Unity uses to rotate the joint around its local x-axis by the Position Spring and Position Damper drive torques. The Maximum Force parameter limits the force. This property is only available if the Rotation Drive Mode property is set to X & YZ. For more information, refer to Driving forces with Configurable Joints.
  • Position Spring: The spring torque that Unity uses to rotate the joint from its current position towards its target position.
  • Position Damper: Reduces the amount of spring torque in proportion to the difference between the joint's current velocity and its target velocity. This reduces the speed of the joint's movement. Set a value above zero to allow the joint to dampen oscillations which would otherwise carry on indefinitely.
  • Maximum Force: Limits the amount of force that the drive can apply. To make the drive apply the force that it's calculated, set this to a high value that the drive is unlikely to calculate.
  • Use Acceleration: Activate to make the drive an acceleration drive rather than a force drive.
Y DriveThis is similar to the X Drive described above but applies to the joint's y-axis.
Z DriveThis is similar to the X Drive described above but applies to the joint's z-axis.
Target RotationThe orientation that the joint's rotational drive rotates towards, specified as a quaternion. The target rotation is relative to the body that the Joint is attached to, unless the Swap Bodies parameter is set, in which case it's relative to the connected body's anchor.
Target Angular VelocityThe angular velocity that the joint's rotational drive aims to achieve. The property is specified as a vector. The vector's length specifies the rotational speed and whose direction defines the axis of rotation.
Rotation Drive ModeSet how Unity applies drive force to the object to rotate it to the target orientation. Set the mode to X and YZ, to apply the torque around the axes as specified by the Angular X/YZ Drive properties described below. If you use Slerp mode then the Slerp Drive properties determine the drive torque.
Angular X DriveThis specifies how the drive torque rotates the joint around its local x-axis. This property is only available if the Rotation Drive Mode property described above is set to X & YZ. For more information, refer to Driving forces with Configurable Joints.
  • Position Spring: The spring torque that Unity uses to rotate the joint from its current position towards its target position.
  • Position Damper: Reduces the amount of spring torque in proportion to the difference between the joint's current velocity and its target velocity. This reduces the speed of the joint's movement. Set a value above zero to allow the joint to dampen oscillations which would otherwise carry on indefinitely.
  • Maximum Force: Limits the amount of force that the drive can apply. To make the drive apply the force that it's calculated, set this to a high value that the drive is unlikely to calculate.
  • Use Acceleration: Activate to make the drive an acceleration drive rather than a force drive.
Angular YZ DriveThis is similar to the Angular X Drive described above but applies to both the joint's Y and Z axes.
Slerp DriveThis specifies how the drive torque rotates the joint around all local axes. The property is only available if the Rotation Drive Mode property described above is set to Slerp. For more information, refer to Configure driving forces on a Configurable Joint.
  • Position Spring: The spring torque that Unity uses to rotate the joint from its current position towards its target position.
  • Position Damper: Reduces the amount of spring torque in proportion to the difference between the joint's current velocity and its target velocity. This reduces the speed of the joint's movement. Set a value above zero to allow the joint to dampen oscillations which would otherwise carry on indefinitely.
  • Maximum Force: Limits the amount of force that the drive can apply. To make the drive apply the force that it's calculated, set this to a high value that the drive is unlikely to calculate.
  • Use Acceleration: Activate to make the drive an acceleration drive rather than a force drive.
Projection ModeThis defines how the joint snaps back to its constraints when it unexpectedly moves beyond them, because the physics engine is unable to reconcile the current combination of forces within the simulation. The options are None and Position and Rotation.
Projection DistanceThe distance the joint must move beyond its constraints before the physics engine attempts to snap it back to an acceptable position.
Projection AngleThe angle the joint must rotate beyond its constraints before the physics engine attempts to snap it back to an acceptable position.
Configured in World SpaceEnable this property to calculate the values set by the various target and drive properties in world space instead of the object's local space.
Swap BodiesEnable this property to swap the order in which the physics engine processes the Rigidbodies involved in the joint. This results in different joint motion but has no impact on Rigidbodies and anchors.
Break ForceIf a force larger than this value pushes the joint beyond its constraints then the joint is permanently "broken" and deleted. Break Force only breaks a joint when its axes are Limited or Locked. For more information, refer to Customize movement constraint with Configurable Joints.
Break TorqueIf a torque larger than this value rotates the joint beyond its constraints then the joint is permanently "broken" and deleted. Break Torque can break a joint regardless of whether its axes are Free, Limited or Locked. For more information, refer to Customize movement constraint with Configurable Joints.
Enable CollisionEnable this property to let the object with the joint collide with the object it is connected to. If this is disabled, the joint and object pass through each other.
Enable PreprocessingIf preprocessing is disabled then certain "impossible" configurations of the joint are kept more stable rather than drifting wildly out of control.
Mass ScaleThe scale to apply to the inverted mass and inertia tensor of the Rigidbody, ranging from 0.00001 to infinity. This is useful when the joint connects two Rigidbodies of largely varying mass. The physics solver produces better results when the connected Rigidbodies have a similar mass. When your connected Rigidbodies vary in mass, use this property with the Connect Mass Scale property to apply fake masses to make them roughly equal to each other. This produces a high-quality and stable simulation, but reduces the physical behaviour of the Rigidbodies.
Connected Mass ScaleThe scale to apply to the inverted mass and inertia tensor of the connected Rigidbody, ranging from 0.00001 to infinity.