# What is the equivalent of HeightmapImpostor for the Havok Physics Engine?

**URL:** <https://forum.babylonjs.com/t/what-is-the-equivalent-of-heightmapimpostor-for-the-havok-physics-engine/42262>\
**Category:** Questions\
**Created:** [July 9, 2023, 12:19pm UTC](https://forum.babylonjs.com/t/what-is-the-equivalent-of-heightmapimpostor-for-the-havok-physics-engine/42262 "2023-07-09T12:19:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ertugrulcetin](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ertugrulcetin/32/33011_2.png) [@ertugrulcetin](https://forum.babylonjs.com/u/ertugrulcetin)\
**Post date:** [July 9, 2023, 12:19pm UTC](https://forum.babylonjs.com/t/what-is-the-equivalent-of-heightmapimpostor-for-the-havok-physics-engine/42262/1 "2023-07-09T12:19:31Z")

</div>

Hi all,  
I’ve found the following code from one of the Playgrounds. The issue is, I’m using the Havok Physics engine and I need to add a rigid body to my terrain, which is created from a height map. Unfortunately, PhysicsShape doesn’t seem to have a specific type for height maps or terrains.

```js
var ground = BABYLON.Mesh.CreateGroundFromHeightMap("ground", "textures/heightMap.png", 100, 100, 100, 0, 10, scene, false, () => {
  ground.physicsImpostor = new BABYLON.PhysicsImpostor(ground, BABYLON.PhysicsImpostor.HeightmapImpostor, { mass: 0, friction: 0.0, restitution: 0.7 })
})

```

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [July 9, 2023, 2:33pm UTC](https://forum.babylonjs.com/t/what-is-the-equivalent-of-heightmapimpostor-for-the-havok-physics-engine/42262/2 "2023-07-09T14:33:33Z")

</div>

Workable solution is using the MESH type aggregate.  
Here’s a PG:

> **[Babylon.js Playground](https://playground.babylonjs.com/#Z8HTUN%23460)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

(from [this thread](https://forum.babylonjs.com/t/havok-physics-wlaking-character-bouncing-over-heightmap/41879/2))

---

<div class="post-metadata">

**Author:** ![ertugrulcetin](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ertugrulcetin/32/33011_2.png) [@ertugrulcetin](https://forum.babylonjs.com/u/ertugrulcetin)\
**Post date:** [July 9, 2023, 3:02pm UTC](https://forum.babylonjs.com/t/what-is-the-equivalent-of-heightmapimpostor-for-the-havok-physics-engine/42262/3 "2023-07-09T15:02:33Z")

</div>

Thank you!
