checkCollisions not working as I expected

I create a box that able to move by arrow keys(Line 64 createTank function ) and a table (Line 154 createTable2 function).

The problem is, the table’s collision is not working. But if I change the height value (Line 285) 0.3 to 3 then it is working as I want.

But If I increase the height value (Line 185) more than 0.3, then it’s not table anymore.
Please, can you tell me, how to make a table, without changing the height value(Line 285)?https://playground.babylonjs.com/#A9MZL8#31

Pinging @RaananW

Hi,

I have no explanation (I am not a BabylonJs expert at all), but I notice something with the tank’s position y: if the tank “touches” the ground (y = 3, line 71), the collision is ok with the table regardless of the height value (I tried with height: 0.01 on line 185).
But if the tank position.y is equal to 2 or 4 for example, the collision is not detected.

It’s just an observation, I’m sorry for that but I hope it can help anyway.

https://playground.babylonjs.com/#A9MZL8#32

1 Like

Thank you so much, my friend. I’m really grateful to you.

1 Like