Skip to main content
2 of 2
Cleanup
DMGregory
  • 136.3k
  • 22
  • 247
  • 373

Detect how much mouse has rotated in a circle around an XY point

How can I detect if the mouse cursor is moving in a circle around a target, and calculate how many turns it's done?

For example, if I rotate the mouse 4 times around a specific XY point on the screen, I would like to re-center my camera (in my context, I need this algorithm for a camera system)

jon
  • 103
  • 4