Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetDofStartIndices(List<int>)

Calculates and reads back reduced coordinate data start indexes in reduced coordinate data buffer for every articulation body in the hierarchy.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public int GetDofStartIndices(List<int> dofStartIndices)

Parameters

dofStartIndices

Supplied list of integers to read back and store the data.

Returns

Type

Description

intTotal degrees of freedom for the entire hierarchy of articulation bodies.

Remarks

In order to read back or set entire articulation hierarchy data in reduced coordinates where every degree of freedom is represented by float value, one needs to find the location of reduced cordinates data for particular ArticulationBody. This can be achieved by calling ArticulationBody.GetDofStartIndices and indexing resulting list by the particular body index via ArticulationBody.index. Number of degrees of freedom for particular articulation body can be found using ArticulationBody.dofCount. Additional Resources: ArticulationBody.index, ArticulationBody.GetDofStartIndices, ArticulationBody.dofCount.