Version: 2023.2

ArticulationBody.GetJointGravityForces

切换到手册
public int GetJointGravityForces (List<float> forces);

参数

forces Supplied list of floats to store the counteracting gravity force data.

返回

int Total degrees of freedom (DOF) for the entire hierarchy of articulation bodies.

描述

Fills the supplied list of floats with forces required to counteract gravity for each Articulation Body in the articulation.

This returns the forces required to counteract gravity in the reduced coordinate space for the entire articulation hierarchy starting from root to the supplied list of floats. Every joint drive force DOF is represented by one float value. Depending on the type of the articulation joint there might be zero, one or three DOFs per 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 via ArticulationBody.index. To find the number of DOF for the articulation body, use ArticulationBody.dofCount.
ArticulationDrives and potential damping terms are not considered in the computation (for example, linear/angular damping or joint friction).


Units of measurement - N (newtons) for linear and Nm (newton-meters) for angular motion.

See Also: index, GetDofStartIndices, dofCount, SetDriveTargets.

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