Version: 2023.2
LanguageEnglish
  • C#

ArticulationBody

class in UnityEngine

/

Inherits from:Behaviour

/

Implemented in:UnityEngine.PhysicsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual

Description

A body that forms part of a Physics articulation.

An articulation is a set of bodies arranged in a logical tree. The parent-child link in this tree reflects that the bodies have their relative motion constrained. Articulations are solved by a Featherstone solver that works in reduced coordinates - that is each body has relative coordinates to its parent but only along the unlocked degrees of freedom. This guarantees there is no unwanted stretch.
Like with regular Joints, there are two anchors for each pair of connected articulation bodies. One anchor is defined in the parent body's reference frame, whereas the other one is defined in the child's reference frame. Changing the constraints, you directly affect the allowed space for relative positions of the two anchors. For instance, ArticulationDofLock.LockedMotion will not allow any relative motion at all.

Properties

anchorPositionPosition of the anchor relative to this body.
anchorRotationRotation of the anchor relative to this body.
angularDampingDamping factor that affects how this body resists rotations.
angularVelocityThe angular velocity of the body defined in world space.
automaticCenterOfMassWhether or not to calculate the center of mass automatically.
automaticInertiaTensorWhether or not to calculate the inertia tensor automatically.
centerOfMassThe center of mass of the body defined in local space.
collisionDetectionModeThe ArticulationBody's collision detection mode.
dofCountThe amount of degrees of freedom of a body.
driveForceThe drive force in reduced coordinates.
excludeLayersThe additional layers that all Colliders attached to this ArticulationBody should exclude when deciding if the Collider can come into contact with another Collider.
immovableAllows you to specify that this body is not movable.
includeLayersThe additional layers that all Colliders attached to this ArticulationBody should include when deciding if a the Collider can come into contact with another Collider.
indexThe index of the body in the hierarchy of articulation bodies.
inertiaTensorThe inertia tensor of this body.
inertiaTensorRotationThe rotation of the inertia tensor.
isRootIndicates whether this body is the root body of the articulation (Read Only).
jointAccelerationThe joint acceleration in reduced coordinates.
jointForceThe joint force in reduced coordinates.
jointFrictionAllows you to specify the amount of friction that is applied as a result of the parent body moving relative to this body.
jointPositionThe joint position in reduced coordinates.
jointTypeThe type of joint connecting this body to its parent body.
jointVelocityThe joint velocity in reduced coordinates.
linearDampingDamping factor that affects how this body resists linear motion.
linearLockXThe type of lock along X axis of movement.
linearLockYThe type of lock along Y axis of movement.
linearLockZThe type of lock along Z axis of movement.
massThe mass of this articulation body.
matchAnchorsWhether the parent anchor should be computed automatically or not.
maxAngularVelocityThe maximum angular velocity of the articulation body measured in radians per second.
maxDepenetrationVelocityThe maximum velocity of an articulation body when moving out of penetrating state.
maxJointVelocityThe maximum joint velocity of the articulation body joint in reduced coordinates.
maxLinearVelocityThe maximum linear velocity of the articulation body measured in meters per second.
parentAnchorPositionPosition of the anchor relative to this body's parent.
parentAnchorRotationRotation of the anchor relative to this body's parent.
sleepThresholdThe mass-normalized energy threshold, below which objects start going to sleep.
solverIterationsThe solverIterations determines how accurately articulation body joints and collision contacts are resolved.
solverVelocityIterationsThe solverVelocityIterations affects how accurately articulation body joints and collision contacts are resolved during bounce.
swingYLockThe magnitude of the conical swing angle relative to Y axis.
swingZLockThe magnitude of the conical swing angle relative to Z axis.
twistLockThe type of lock for twist movement.
useGravityControls whether gravity affects this articulation body.
velocityLinear velocity of the body defined in world space.
worldCenterOfMassThe center of mass of the body defined in world space (Read Only).
xDriveThe properties of drive along or around X.
yDriveThe properties of drive along or around Y.
zDriveThe properties of drive along or around Z.

Public Methods

AddForceApplies a force to the ArticulationBody.
AddForceAtPositionApplies a force at a specific position, resulting in applying a torque and force on the object.
AddRelativeForceApplies a force to the Articulation Body, relative to its local coordinate system.
AddRelativeTorqueApplies a torque to the articulation body, relative to its local coordinate system.
AddTorqueAdd torque to the articulation body.
GetAccumulatedForceReturns the force that the ArticulationBody has accumulated before the simulation step.
GetAccumulatedTorqueReturns the torque that the ArticulationBody has accumulated before the simulation step.
GetClosestPointReturn the point on the articulation body that is closest to a given one.
GetDenseJacobianCalculates and writes dense Jacobian matrix of the articulation body hierarchy to the supplied struct.
GetDofStartIndicesCalculates and reads back reduced coordinate data start indexes in reduced coordinate data buffer for every articulation body in the hierarchy.
GetDriveForcesReads the entire hierarchy of Articulation Bodies and fills the supplied list of floats with Articulation Drive forces.
GetDriveTargetsReads back articulation body joint drive targets of the entire hierarchy to the supplied list of floats.
GetDriveTargetVelocitiesReads back articulation body joint drive target velocities of the entire hierarchy to the supplied list of floats .
GetJointAccelerationsReads back articulation body joint accelerations of the entire hierarchy to the supplied list of floats .
GetJointCoriolisCentrifugalForcesFills the supplied list of floats with the forces required to counteract the Coriolis and centrifugal forces for each Articulation Body in the articulation.
GetJointExternalForcesFills the supplied list of floats with forces required to counteract any existing external forces (applied using ArticulationBody.AddForce or ArticulationBody.AddTorque) for each Articulation Body in the articulation.
GetJointForcesReads back articulation body joint forces of the entire hierarchy to the supplied list of floats .
GetJointForcesForAccelerationReturns the forces required for the body to reach the provided acceleration in reduced space.
GetJointGravityForcesFills the supplied list of floats with forces required to counteract gravity for each Articulation Body in the articulation.
GetJointPositionsReads back articulation body joint positions of the entire hierarchy to the supplied list of floats .
GetJointVelocitiesReads back articulation body joint velocities of the entire hierarchy to the supplied list of floats .
GetPointVelocityGets the velocity of the articulation body at the specified worldPoint in global space.
GetRelativePointVelocityThe velocity relative to the articulation body at the point relativePoint.
IsSleepingIndicates whether the articulation body is sleeping.
PublishTransformReads the position and rotation of the Articulation Body from the physics system and applies it to the corresponding Transform component.
ResetCenterOfMassResets the center of mass of the articulation body.
ResetInertiaTensorResets the inertia tensor value and rotation.
SetDriveDampingSets the damping value of the specified drive.
SetDriveForceLimitSets the force limit of the specified drive.
SetDriveLimitsSets the lower and upper limits of the drive.
SetDriveStiffnessSets the stiffness value of the specified drive.
SetDriveTargetSets the target value of the specified drive.
SetDriveTargetsAssigns articulation body joint drive targets for the entire hierarchy of bodies.
SetDriveTargetVelocitiesAssigns articulation body joint drive target velocities for the entire hierarchy of bodies.
SetDriveTargetVelocitySets the target velocity value of the specified drive.
SetJointForcesAssigns articulation body joint forces for the entire hierarchy of bodies.
SetJointPositionsAssigns articulation body joint positions for the entire hierarchy of bodies.
SetJointVelocitiesAssigns articulation body joint velocities for the entire hierarchy of bodies.
SleepForces an articulation body to sleep.
SnapAnchorToClosestContactSnap the anchor to the closest contact between the connected bodies.
TeleportRootTeleport the root body of the articulation to a new pose.
WakeUpForces an articulation body to wake up.

Inherited Members

Properties

enabledEnabled Behaviours are Updated, disabled Behaviours are not.
isActiveAndEnabledReports whether a GameObject and its associated Behaviour is active and enabled.
gameObjectThe game object this component is attached to. A component is always attached to a game object.
tagThe tag of this game object.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Methods

BroadcastMessageCalls the method named methodName on every MonoBehaviour in this game object or any of its children.
CompareTagChecks the GameObject's tag against the defined tag.
GetComponentGets a reference to a component of type T on the same GameObject as the component specified.
GetComponentInChildrenGets a reference to a component of type T on the same GameObject as the component specified, or any child of the GameObject.
GetComponentInParentGets a reference to a component of type T on the same GameObject as the component specified, or any parent of the GameObject.
GetComponentsGets references to all components of type T on the same GameObject as the component specified.
GetComponentsInChildrenGets references to all components of type T on the same GameObject as the component specified, and any child of the GameObject.
GetComponentsInParentGets references to all components of type T on the same GameObject as the component specified, and any parent of the GameObject.
SendMessageCalls the method named methodName on every MonoBehaviour in this game object.
SendMessageUpwardsCalls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.
TryGetComponentGets the component of the specified type, if it exists.
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static Methods

DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961