<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [Simulation](./server.simulation.md) &gt; [setGravity](./server.simulation.setgravity.md)

## Simulation.setGravity() method

Sets the gravity vector for the simulation.

**Signature:**

```typescript
setGravity(gravity: RAPIER.Vector3): void;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

gravity


</td><td>

RAPIER.Vector3


</td><td>

The gravity vector.


</td></tr>
</tbody></table>
**Returns:**

void

