Hi guys, so, I'm developing a CircleShape class for collisions and it's defined by radius only. I have other classes such as EdgeShape and PolygonShape.
In EdgeShape and PolygonShape I transform the verteices that define them and then calculate minX, maxX, minY and maxY to create de AABB (someone like sf::FloatRect). Everything works perfectly.
The problem comes computing the AABB from the CircleShape. I tried with this code:
AABB CircleShape::getAABB (const sf::Transform &transform)
{
return transform.transformRect (sf::FloatRect (0, 0, radius * 2.f, radius * 2.f));
}
but when I rotate it, its width and height increase, and that is not correct.
Thanks!!
![Grin ;D](https://www.sfml-dev.org/forums/Smileys/default/grin.gif)