Hi all,
In SFML how would I rotate a shape around some point which is outside the shape's boundary, using transformations? I know how to use cos and sin but like to understand how to use transformation.
Here is one example:
// Draw circle at center
sf::CircleShape c;
c.setFillColor(sf::Color::Red);
c.setPosition(width / 2, height / 2 - 100);
c.setRadius(50);
c.setOrigin({50, 50});
while(true)
{
window.clear(sf::Color::Black);
// rotate around center of screen
window.draw(c);
window.display();
}
Thanks all!
Christian