Skip to main content
2 of 6
Cleanup
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

How to implement a dial control that snaps to increments?

How can I implement snapping via code? I have this 2d circle that the players rotate via drag and it works like a rotating dial. The best way to describe what I wanted to achieve is similar to a clock hand snapping to the hour numbers. I'm a total beginner and haven't actually learned anything about quaternions.

Image of dial with 0 at the top and 7 increment marks evenly spaced around the rest