I have a layout 3000x500. And player window is 500x500. Player have a valve in front of him - when player rotate valve he scrolls around layout . Its like aiming system on old tanks. I need to make - three full rotates of valve to right is scroll to 1500px by x to right, and same for the left. Trouble is to detect valve spins, cuz when it hits 360 degrees its goes 0 again. I need a way to detect "overall" angle of valve.
Develop games in your browser. Powerful, performant & highly capable.
Use a variable. Add or subtract to the variable and then set the angle of the object to that value. Then, all of your comparisons can be done off of the variable instead of the angle of the object.