Car falls through the collision mesh

Car falls through the collision mesh as is on the screenshot
road collision mesh as parent
road model as child


Don’t know what the issue is
the car has rigidbody dynamic and collision box

I made the collision mesh of road by reducing in model to 50% polys and then set this reduced model as collision mesh of road

the scene is here: https://playcanvas.com/editor/scene/914226

Hi @grzesiekmq,

It’s not easy to debug this, your project is constantly lagging the editor, it’s very difficult to click around. Sorry for keep saying this, but this is a showstopper.

As a generic advice, your collision model still doesn’t seem to be optimized for Ammo collision:

  • polycount is 344K, that’s too big
  • it’s very long on the X and Z axis, and very thin, Y axis, that’s not good in general for a collision mesh. You may have to split it to smaller models.
2 Likes

some modification:
created new scene with only collision mesh of road, road model and car
and I put into scene the reduced with 50% polys model as child
and parent as is the collision mesh of road
it aligns but the same, car falls through
here is the scene
https://playcanvas.com/editor/scene/926169

Isn’t the car much bigger than the road’s width?

Also your collision mesh is still 344K big, take note of this. This is your biggest issue:

1 Like


I found the car bounces in some height
when I pull it
the collision mesh is reduced to 10% polys
restitution is 0

Is the car on the road in the editor?

It also seems that the collision box of the car is much too large.

I would suggest that the team start diving into debugging this. It’s possible that:

  • Because it is flat, it has no volume
  • The tris on the collision are still too small

Personally, I think the shape and volume of the mesh is the issue (it’s not a self contained shape and there are ‘holes’ in the mesh) and would try much smaller experiments on what the collision mesh could be in shape and volume.

1 Like

As Bullet is open source, you can try looking if anyone else has had similar problems too in other engines like Panda3D.

yes probably the tris are small but when I test it with setup like this:
collision mesh: road_b with a lot tris
and road model with 34k tris


then the car not falls through but cant move
ok I try to increase the poly count from 34k tris maybe this is too small

When I said the tris are too small, I meant in size not number. IE. Use much less for the collision, such as less than 5K. There are whole sections of road that are straight which can be two tris.

2 Likes

https://playcanvas.com/project/387026/overview/free-collision-detection-library
is using this library should work with large collision meshes with a lot of tris?
or it is deprecated and not useful?

It’s very old and by a community member who unfortunately no longer around. The original source code repo is also not available. It also doesn’t do simulation.

1 Like