0 votes

Hey all!

I'm getting a single error when I run my game (not a game breaker, but a red error) and I can't figure out how to track down the problem.

The error states:
decomposepolygoninconvex: Convex decomposing failed!
<C++ Source> core/math/geometry.cpp:702 @ decompose
polygoninconvex()

I'm guessing it's a tilemap collision error, but as I have multiple tilemaps and tons of unique tiles within those tilemaps, I'm trying to figure which tile or collision volume within those tiles is causing the error.

Does anyone know of a way to "drill down" further into the error? I had a quick look at profiler but don't see any options there to help me isolate the error.

Thanks in advance!

in Engine by (72 points)

I'm guessing what's happening is that, when the engine computes the collisions, it tries to use a convex algorithm for some polygons. When it gets to certain polygons in your tilemap collisions, it can't apply that algorithm, and gives an error. My only suggestion is to find polygons in the tilemap whose outer angles are greater than 180° (i.e. convex polygons) and change the points of the collision outline.

Thank you for the info. I guess I'll have to go through each tileset one by one to try and figure out which ones may be causing the issue. I was hoping there was a way to get more info on the error, but if not I guess it's time for a little elbow grease.

Cheers!

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.