Hi,
I've made a "Wheel of Fourtune" style interface - I have a wheel on screen you can rotate and spin by clicking/dragging or "swiping" and I programmed it to decelerate to a stop.
However, I would like it to rotate at least 3 full rotations before it begins to decelerate and I am having trouble working this out...
I am using the "rotate" behavior to make the wheel rotate and to count rotations, I attempted to compare the wheel angle (If more than 359, rotationCount = rotationCount + 1) in order to count the rotations on Every Tick, figuring that every time the wheel hits 360 degrees the counter would advance.
In theory, this works (at very slow speeds). The issue is that if the wheel spins too fast (greater than 60deg/sec), the Every Tick is missing the point at which the wheel is at 360degrees and so the counter never advances (or at least advances only sporadically when the stars align). This is obviously related to the speed of "Every Tick."
I feel like I am missing something obvious, but is there a way to run this check faster than "Every Tick" or is there a better way to count rotations that someone can suggest?
I tried putting the wheel position comparison code outside of Every Tick, but the result is the same. I also know I have run loops before that iterate the entire loop, more or less, instantaneously so I know code can be executed faster, It seems like I am just missing something obvious here.
Thank you for the help!
J