Convex decomposing failed! in just one wierd shape, while similar ones work with no error

Godot Version

v4.5.1.stable.steam [f62fdbde1]

Question

Hello,

I’m adding colision to my test TileSet and it is looking like this.

All collisions in all tiles other than the selected green one are working.

This is the culprite tile

I could pinpoint the issue to the bottom left triangle, which the corner vertex when put right on the edge of the tile gives this error:

E 0:00:01:298 decompose_many_polygons_in_convex: Convex decomposing failed!
<C++ Source> core/math/geometry_2d.cpp:100 @ decompose_many_polygons_in_convex()

I have tested sligtly nudging the vertex inwards, so it is not touching the corner, and it works. However, it feels like a bandaid fix and I don’t know if it will cause issues later one, so I wanted to know if there is an actual good fix instead. The triangle on the top corner works perfectly and all other triangles on the other tiles work, its just this one.

Thank you for the help!

For future people comming to this thread with the same issue, I don’t know what changed, nor what was causing the error, but one day I just opened the project and tried to change the vertex to the corner and it worked.

1 Like

I find 4.5.1 acting weird sometimes, like not updating everything properly. A bit hard to describe.

For example I connect a signal, but it’s not shown that it’s connected, or it’s not working properly when you run the project. But it works ok, usually when you restart the project or reload the scene.

Same thing when you update a image as texture, and then the updated texture is not shown in the atlassource that is already in a node…

May be related to this, maybe not.

Make sure there are indeed only 3 points. Print out the polygon data.