# Ammo.js heigtmap / heightfeild

**URL:** <https://forum.babylonjs.com/t/ammo-js-heigtmap-heightfeild/4333>\
**Category:** Questions\
**Created:** [July 7, 2019, 1:57pm UTC](https://forum.babylonjs.com/t/ammo-js-heigtmap-heightfeild/4333 "2019-07-07T13:57:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_K](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@Mr\_K](https://forum.babylonjs.com/u/Mr_K)\
**Post date:** [July 7, 2019, 1:57pm UTC](https://forum.babylonjs.com/t/ammo-js-heigtmap-heightfeild/4333/1 "2019-07-07T13:57:29Z")

</div>

Hi folks! I’ve been using the handy CreateGroundFromHeightMap to generate terrain, however I’m unable to make anything collide with in using ammo physics.

I’ve been experimenting in a [plaground](https://www.babylonjs-playground.com/#8T3YBR#1) to see if I can add it natively with ammo, taking inspiration from this [three.js example](https://github.com/mrdoob/three.js/blob/master/examples/webgl_physics_terrain.html).

If anyone has any ideas on how to get this working please let me know. 🙂

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [July 7, 2019, 5:11pm UTC](https://forum.babylonjs.com/t/ammo-js-heigtmap-heightfeild/4333/2 "2019-07-07T17:11:16Z")

</div>

Hiya Mr\_K! Are ya ready for some good news?

[https://www.babylonjs-playground.com/#UV2S4R#17](https://www.babylonjs-playground.com/#UV2S4R#17)

Cool “spheres on the peaks”, eh? nod. Talk about “maintaining balance”! 🙂  
I didn’t do that… or hardly anything, for this playground.

Although the HeightmapImpostor is not yet supported in our AmmoJS plugin, the MeshImpostor IS!

In the same breath, I applaud your hutzpah in “going native” with AmmoJS (native calls). THAT… is pretty cool and takes some bravery. Have you worked-with Bullet… or do you have some hands-on time going native with Cannon or Oimo?

All in all, I’m impressed! Coooool. I hope I didn’t ruin all your native-call fun. 🙂

---

<div class="post-metadata">

**Author:** ![Mr\_K](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@Mr\_K](https://forum.babylonjs.com/u/Mr_K)\
**Post date:** [July 8, 2019, 8:55am UTC](https://forum.babylonjs.com/t/ammo-js-heigtmap-heightfeild/4333/3 "2019-07-08T08:55:41Z")

</div>

Thanks for the help Wingnut! Those balancing spheres look harmonious on their peaks but I want something a little more chaotic like [jumping cars](https://fx-wizard.com/game) over a ramp!

Now all I need to do is work out how to get the wheels to spin the right way around 😛

I don’t know if I’d call going native with ammo bravery. Its more like insanity. I had made a working prototype using cannon but found myself reaching its limits pretty quick so I swapped to ammo. Unfortunately Ammo has very little in the way of documentation so being able to read bullets c++ api docs helps.
