Version: 2022.3
LanguageEnglish
  • C#

ArticulationBody.GetDriveForces

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

Declaration

public int GetDriveForces(List<float> forces);

Parameters

forces Supplied list of floats to store the drive force data.

Returns

int Total degrees of freedom (DOF) for the entire hierarchy of Articulation Bodies.

Description

Reads the entire hierarchy of Articulation Bodies and fills the supplied list of floats with Articulation Drive forces.

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 ArticulationBody.index. To find the number of DOF for the Articulation Body, use ArticulationBody.dofCount.

See Also: index, GetDofStartIndices, dofCount, SetJointForces.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961