I was so surprised that this worked that I actually jumped out of my chair. When I hold down the “A” key the line rotates counter-clockwise around the blue circle (like a clock hand).
I spent ages working this out on graph paper. I’ve been working on the next iteration of Chocolate Quest. It’s going to be a top-down game controlled by the arrow keys. I’ve been trying to implement as much of the movement code on my own, instead of using SFML functions. Rotation is weird, and I didn’t feel right implementing it before I really understood it. I think I have it all worked out, but it’s going to take time to clean up my notes and make a coherent post out of it.
Next is making the little circle move in the direction the line is pointing. After I know I understand how to do movement, I’ll feel comfortable using the built-in SFML functions. It would feel like cheating otherwise.