I'd like to create a game such as Reus.
I have one circle sprite (for the earth) and i would like it to "smooth" rotate with my mouse. Such as if there was a touch scroll all around the earth which would make it rotate around its own center.
Do you have any idea how to do that ?
I'm thinking of using the Physics Behavior and using torques and angular velocity but how can I get the swipe movement of the mouse ?
So you want to touch screen - touch anywhere, and while you touching and moving your finger circle should rotate? But rotate only when you are moving your finger.
Develop games in your browser. Powerful, performant & highly capable.
I'd like to do it smooth : when you release the touch, the rotation slows down to 0.
So when you touch and move your mouse/finger in any direction, the circle rotate in this direction and you release your mouse/touch, the rotation stops. And you touch again at the same place to continue the rotation (such as android/iphone touch scroll)
Something like this?
I've finally done it, thanks to your help for the scroll (I wanted to enable a 360° scroll).
I used the behavior rotation combined with Touch.SpeedAt to continue the rotation after the user releases the touch (and a positive/negative acceleration depending on wich side it's turning to make it stop).
Here is my .capx for those who might have the same question :
Thank you Shinkan
ahh, I misunderstood your question a bit.
But I'm glad you were able to solved it yourself.