Hi folks,
I’ve seen a couple of tutorial that simulate a planet moving on a circular orbit. I would like to do something similar. However, I would like to be able to drag the planet with the mouse, but the planet should stay on its orbit.
What is the best way to do this?
At the moment, I have a Sprite container with a child - an image extending SimpleButton - and I’m using the Sprite.rotation variable to make it rotates. The problem resides with MouseEvent.MOUSE_MOVE, when I want to adjust the .rotation value. I have a hard time linking the proper (x, y) differences between the mouse and the planet position.