SFML community forums
Help => Window => Topic started by: huhfhewfoiwefi on October 12, 2021, 03:20:55 pm
-
Video example: https://www.youtube.com/watch?v=ilBknCcZvZ4
Sorry if this is the wrong category I am new on the forum.
-
You can use atan() to calculate the needed rotation.
I've created once two examples, one for a shape and one for a vertex array.
https://github.com/eXpl0it3r/Examples/blob/master/SFML/RotatingTriangle.cpp
https://github.com/eXpl0it3r/Examples/blob/master/SFML/RotatingVertices.cpp