# AmmoPhysicsWorld

Class · extends [`PhysicsWorld`](https://api.playcanvas.com/engine/classes/PhysicsWorld.md) · category: Physics

Source: https://github.com/playcanvas/engine/blob/f059dc005842f76e052cdf44d8370c8c7ec475ac/src/framework/physics/ammo/ammo-physics-world.js#L164

The Ammo.js (Bullet) physics backend. The `Ammo` global must be available when the world is
constructed - load the library first, then supply the backend to the application:

```javascript
WasmModule.setConfig('Ammo', {
    glueUrl: 'ammo.wasm.js',
    wasmUrl: 'ammo.wasm.wasm',
    fallbackUrl: 'ammo.js'
});
await new Promise((resolve) => {
    WasmModule.getInstance('Ammo', () => resolve());
});

const options = new AppOptions();
options.physicsWorld = new AmmoPhysicsWorld();
```

When [AppOptions#physicsWorld](https://api.playcanvas.com/engine/classes/AppOptions.md#physicsworld) is omitted, the engine creates this backend
automatically once application libraries have loaded, if the Ammo global is present.

## Constructors

### constructor

```ts
new AmmoPhysicsWorld()
```

Create a new AmmoPhysicsWorld instance. The Ammo library must be loaded before the
backend is constructed.

## Inherited from [NullPhysicsWorld](https://api.playcanvas.com/engine/classes/NullPhysicsWorld.md)

- `nativeWorld: any`
