GetDriveForces(List<float>)
Reads the entire hierarchy of Articulation Bodies and fills the supplied list of floats with Articulation Drive forces.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
public int GetDriveForces(List<float> forces)
Parameters
Supplied list of floats to store the drive force data.
Returns
Type | Description |
|---|---|
| int | Total degrees of freedom (DOF) for the entire hierarchy of Articulation Bodies. |
Remarks
This returns Articulation Drive forces in the reduced coordinate space for the entire Articulation hierarchy starting from the root to the supplied list of floats. Every drive force DOF is represented by one float value. However, there might be zero, one or three DOFs per joint, depending on the type of the articulation joint. To find the exact location of the data in the resulting list for the specific Articulation Body, call ArticulationBody.GetDofStartIndices and index the returned dofStartIndices list by the particular body index with _index. To find the number of DOF for the Articulation Body, use _dofCount.
Additional Resources: _index, ArticulationBody.GetDofStartIndices, _dofCount, ArticulationBody.SetJointForces