ClothImpostor acts weird

Hello everyone,

Recent days trying to learn Babylon.js to create 3D games. I loved Babylon because of clean API and easy of use. My issues with ClothImpostor, there is a plane with ClothImpostor (which will be a soccer goal net in my soccer game).

Its more than 6 hours i am trying to solve this issues, but i couldn’t find solution, i hope somebody will help.

Pinging @RaananW or @Cedric.

Note that for your first problem you can simply remove the physic impostor of the ground - I’m not sure you need it anyway?

…and welcome aboard!

1 Like

Let me check that!

For the 2nd issue, it’s a well know problem already answered here : Cylinder goes through box, using Ammo.js

And with a fixed PG:
cloth-pass-through-issue | Babylon.js Playground

I’m taking a look at the 1st issue.

1 Like

For the 1st issue, the problem is because of too large margin. With smaller values, it works fine:

clot-ground-issue | Babylon.js Playground

Imagine the margin as virtual spheres around the points. smaller values = smaller spheres.

A video of collision shape margin is visible here : Bullet Physics Collision Margins and Shapes - YouTube


Wow, thank you for quick response! You saved my day! @Evgeni_Popov i have physic impostor on the ground to stop ball goes through it because of gravity. Is there another way to make collision between ball and ground without physic impostor?