I then use movewithcollisions to implement collision detection and movement, but I found that when there is an object above the move, I cannot move to the specified area

I then use movewithcollisions to implement collision detection and movement, but I found that when there is an object above the move, I cannot move to the specified area under the blue roof. Why can not move into??

Is it a bug or i miss some setting?

https://www.babylonjs-playground.com/#57F8ES

Hello and welcome!
Probably the object above also collides?
Small repro of your issue at Playground will greatly help to give more detailed answer.

3 Likes

I create it at playground.

Can you tell me why the box can not move into the area under the blue roof?

arrowup ->move forward

This is caused by the collision ellipsoid of the mesh. By default, it is sized at (0.5,1,0.5), and is not affected by the scaling of the mesh - so since you scaled your mesh down, you have to scale the ellipsoid down too. Here’s an example where I scaled the ellipsoid and display it, it goes under the roof: movewithcollisions bug? | Babylon.js Playground (babylonjs-playground.com)

2 Likes