flame-engine / flame

A Flutter based game engine.
https://flame-engine.org
MIT License
9.31k stars 915 forks source link

docs: Remove counterclockwise order requirement for PolygonComponent vertices #3352

Closed maurovanetti closed 1 month ago

maurovanetti commented 1 month ago

Description

The documentation used to require that lists of vertices in PolygonComponent (and its subclass PolygonHitbox) should be in counterclockwise order. This is no more necessary because the implementation is robust: https://github.com/flame-engine/flame/blob/main/packages/flame/lib/src/geometry/polygon_component.dart#L122-L124

Moreover, the wording was a bit confusing (the example looks clockwise).

The paragraphs mentioning the vertex order were deleted altogether.

Checklist

Breaking Change?

Related Issues

maurovanetti commented 1 month ago

Good. I didn't realise those bits were wrong actually. Now I get what confused me in the first place!