HeightmapImposter not working for me


I created a playground here https://playground.babylonjs.com/#QLH09X#3.

As you can see in the code, I used BABYLON.PhysicsImpostor for both ground and box, but the box still just went through the ground.

I basically just follow this https://www.babylonjs-playground.com/#D3LQD#7

I’m sure it’s just a small thing that’s missing, but I just can’t spot it.

Thank you in advance.

Hi @Jieling_Yang

The physics Impostor must be create when the ground mesh is ready. Here is a fixed PG:


1 Like

Thanks again Cedric :grinning:

1 Like

Hi Cedric,

Another question: The playground you provided, ground is using HeightmapImposter, however if you look close enough, you will see when the box landed, it appeared to be hitting on BoxImposter because it’s hovering.

This is different from this https://playground.babylonjs.com/#D3LQD#7. So, what’s make the difference?

Switching to Cannon fixes the issue:


1 Like