Item falls through the floor but only at some angles

Godot Version

Godot 4.3

Question

I’m having a problem that I just can’t seem to fix.
I’ve been making a game where I have an inventory with items I can pick up.

The items are generated by code, so I have a script where I set the mesh and collision box for each item.

But for some reason my swords falls through the floor sometimes but not always
Can be seen in this clip https://imgur.com/a/G7vjPdO

This is what to collision looks like for the sword https://imgur.com/a/d76gZrz

The bottles also seen works fine and are made the same why.

I use jolt as a physics engine as well since I’ve seen that the default ain’t the best
Anybody experienced anything similar? or any tips on what might be the reason for it

Are you using Godot’s built-in collision shapes or creating your own collision mesh into the 3D model? If the latter, recalculate its normals, maybe it can fix it (I had problems before with flipped normals in collision meshes causing similar issues).

It’s a ConcexPolygonShape3D generated by godot, in the inspector I click on the meshinstance3d then mesh, and choosing sibling and simplified convex

Maybe Godot is generating it with issues…

I would recommend you to use a simpler shape (such as a BoxShape3D) to avoid issues with auto-generated complex meshes, or creating your own in the 3D model itself to have more control.

Here some tips about import hints (so you set an object to be -colonly and -rigid):

2 Likes

Thanks for the tip, I’ll try that as soon as I get time

In my experience, only the simple, built-in shapes are suitable for moving objects. All other collision types are only suitable for static bodies.

2 Likes