# ClothImpostor acts weird

**URL:** <https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378>\
**Category:** Questions\
**Created:** [December 7, 2020, 6:22am UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378 "2020-12-07T06:22:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alparslanahmed](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alparslanahmed/32/12527_2.png) [@alparslanahmed](https://forum.babylonjs.com/u/alparslanahmed)\
**Post date:** [December 7, 2020, 6:22am UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378/1 "2020-12-07T06:22:12Z")

</div>

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).

- When i position it close to ground, it behaves like there is a force field around ground. But when i position it higher works fine. [https://playground.babylonjs.com/#13G950#7](https://playground.babylonjs.com/#13G950#7)

- When i throw sphere on clothe with high speed, sphere passes through from body. [https://playground.babylonjs.com/#13G950#8](https://playground.babylonjs.com/#13G950#8)

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

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [December 7, 2020, 10:37am UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378/2 "2020-12-07T10:37:14Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 7, 2020, 10:38am UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378/3 "2020-12-07T10:38:51Z")

</div>

Let me check that!

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 7, 2020, 11:52am UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378/4 "2020-12-07T11:52:08Z")

</div>

For the 2nd issue, it’s a well know problem already answered here : [Cylinder goes through box, using Ammo.js](https://forum.babylonjs.com/t/cylinder-goes-through-box-using-ammo-js/12086/3)

And with a fixed PG:  
[cloth-pass-through-issue | Babylon.js Playground](https://playground.babylonjs.com/#13G950#9)

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

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 7, 2020, 11:55am UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378/5 "2020-12-07T11:55:59Z")

</div>

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

[clot-ground-issue | Babylon.js Playground](https://playground.babylonjs.com/#13G950#10)

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](https://www.youtube.com/watch?v=BGAwRKPlpCw&hd=1)

---

<div class="post-metadata">

**Author:** ![alparslanahmed](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alparslanahmed/32/12527_2.png) [@alparslanahmed](https://forum.babylonjs.com/u/alparslanahmed)\
**Post date:** [December 7, 2020, 1:42pm UTC](https://forum.babylonjs.com/t/clothimpostor-acts-weird/16378/6 "2020-12-07T13:42:47Z")

</div>

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?
