Why does this ball keeps hitting the edges of my StaticBody3D floor tiles?

Godot Version

v4.2.2.stable.official [15073afe3]


I have a ball (RigidBody3D) and some floor tiles that are Made up of a MeshInstance3D with a texture, A StaticBody3D and a CollisionShape3D with a box. When the ball rolls over the tiles, it ‘sometimes’ collides with the edges between them.

See: https://www.youtube.com/watch?v=Ivr-piYt5Z4

There could a limit on the number of contacts causing the issue. Maybe. I suppose a larger collision shape is undesirable? You wouldn’t have to change your tiles just make a single collision body with no visual aspect.

I don’t think I can have a single larger collision box, as I want to be able to generate the tables in code.

You should be able to mess with the number of contacts limits. Although I don’t know if it will solve the issue. I have seen similar issues on adjacent level collision shapes.

Other things to fiddle with is the collision margin.

So I fixed this.

Originally the dimensions of the tiles were 0.2x0.2 , scaled them up to 2x2 (and scaled the ball up) and the problem has gone away.

I’m guessing the built in collision detection was having accuracy issues with the smaller sizes

1 Like