# GetJointGravityForces(List<float>)

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

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public int GetJointGravityForces(List<float> forces)
```

### Parameters

**** (\[List\<float>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): Supplied list of floats to store the counteracting gravity force data.

### Returns

| Type                                                       | Description                                                                     |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Total degrees of freedom (DOF) for the entire hierarchy of articulation bodies. |

### Remarks

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](/engine/6000.5/script-reference/unityengine/articulationbody/getdofstartindices.md) and index the returned dofStartIndices list by the particular body index via [ArticulationBody.index](/engine/6000.5/script-reference/unityengine/articulationbody/index.md). To find the number of DOF for the articulation body, use [ArticulationBody.dofCount](/engine/6000.5/script-reference/unityengine/articulationbody/dofcount.md).

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.

Additional Resources: [ArticulationBody.index](/engine/6000.5/script-reference/unityengine/articulationbody/index.md), [ArticulationBody.GetDofStartIndices](/engine/6000.5/script-reference/unityengine/articulationbody/getdofstartindices.md), [ArticulationBody.dofCount](/engine/6000.5/script-reference/unityengine/articulationbody/dofcount.md), [ArticulationBody.SetDriveTargets](/engine/6000.5/script-reference/unityengine/articulationbody/setdrivetargets.md).
