fallahn / xygine

2D engine / framework built around SFML
218 stars 19 forks source link

Drawable::updateLocalBounds() does not account for negative sized AABBs #111

Closed fallahn closed 5 years ago

fallahn commented 5 years ago

Depending on winding order of vertices some AABBs may be calculated with a negative width or height - the current implementation only expects positive numbers so in these cases an AABB with zero width and height may be generated, causing the drawable to be permanently culled from rendering. Current workarounds are to either ensure the first vertex in the drawable's array is the closest to the origin, or to manually disable culling on the drawable.