8 Vertex Polygon Apparently Isn't "Convex"

How do I…

The Wiki says Polygons aren’t “Convex” if they have less than 3 vertices, but as you can see, I have 8, and I’m still getting the error. Does anyone know what that’s about?

Related screenshots

You have a bunch of valleys in your shape making it concave, so it is correct.

You will need to either make multiple shapes or outright remove the valleys (the big Vs/right angle indents on the top)

Concave/convex are actual defined words and don’t have anything to do with just total number of vertices, it’s just not possible to have a convex polygon with less than 3 vertices.

1 Like

Convex means there are no 3 sequential nodes that have an interior angle greater than 180 degrees. I’ve highlighted the 2 issue nodes:

2 Likes

@MrMen you said it infinitely better than I could over a phone keyboard. Thanks!

2 Likes

Okay, that makes sense. But why is that a problem? Am I meant to make a million smaller hitboxes every time I need an irregular shape? Why is it so limited?

That’s game dev in general.

Concave shapes are mathematically intensive to calculate and almost never used in 2D game development. In fact, most games just use outright squares for hitboxes rather than exact sizing.

Here’s an example from Symphony of the Night:
image

Here’s one from Celeste:

1 Like

Wow, I never would’ve guessed. Hmmm… okay, thanks.