Ammo.js heigtmap / heightfeild

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 to see if I can add it natively with ammo, taking inspiration from this three.js example.

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

Hiya Mr_K! Are ya ready for some good news?

https://www.babylonjs-playground.com/#UV2S4R#17

Cool “spheres on the peaks”, eh? nod. Talk about “maintaining balance”! :slight_smile:
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. :slight_smile:

1 Like

Thanks for the help Wingnut! Those balancing spheres look harmonious on their peaks but I want something a little more chaotic like jumping cars over a ramp!

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

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.