Rotate Around Centre In Relation To Mouse
robert.mccarthy
Member Posts: 165
Hi All,
Need some help with getting an actor to rotate about it axis depending on mouse position.
Can anyone help point me in the right direction?
Thanks,
Need some help with getting an actor to rotate about it axis depending on mouse position.
Can anyone help point me in the right direction?
Thanks,
Comments
But instead of the +240 and the +160, use the mouse position.
Put game.Mouse.Position.X in the first field
...and game.Mouse.Position.Y in the next field
The circle will rotate in relation to the mouse position.
Thanks but I think I have explained a little wrong (or with two meanings).
Basically, I have a long arrow. I want it to spawn when I have my mouse down. Then when the mouse is down, I want it to rotate in relation to me moving my mouse. So if I move my mouse a bit left, then it will follow the mouse and rotate in one direction only a bit (and vice versa for the other way).
Cheers,
I'm after an arrow that moves around its axis depending on the mouse position.
So if the mouse is in position north then the arrow will be facing north.
As the user moves to another position on the screen, it follows on its axis.