Some days ago I showed you a HTML5 prototype to drag and rotate a wheel and control your character like in “Puppet Bird” game.
Look at his version of the game:
Rather than handling drag events, @mobiadge placed a marker in the same spot of the knob, and determined drag rotation as the difference between current and previous marker angle.
Some adjustments are needed to deal with positive and negative angles, and also to prevent the marker to rotate too fast when we move the mouse close to its center.
What a brilliant idea!
So I opened GDevelop to build, starting from @mobiadge concept, an even simpler version:
It’s basically the same stuff, but I clamp angle difference to prevent the marker to rotate too fast and use GDevelop native method to compute angle difference.
Look at the result, I left the maker visible for a better understanding:
Drag and rotate the crank to raise or lower the bird.