|
rotate with mouse |
neil dwyer
Member #7,237
May 2006
|
I am trying to use the mouse to make a bitmap rotate(if the mouse moves along the x axis, the bitmap rotates accordingly). I have been trying to do it with get_mouse_mickeys() and rotate_sprite() but now luck. I do have a feeling I am doing it all wrong. Here's the code:
Right now I am focusing on player1 just to get it working properly. |
Vasco Freitas
Member #6,904
February 2006
|
You should have "if(mickeyx > 0)" and "if(mickeyx < 0)". And if you want it to rotate accordingly to the speed you move the mouse, you should have something like "player1_rotate += mickeyx * SPEED;". Probably there's something else wrong but that's all I see now. What happens when you try to rotate the bitmap? |
neil dwyer
Member #7,237
May 2006
|
Yes I was going to do your idea but I wanted to see if I could get it to rotate first. Edit: Ok, it wasn't rotating because it had to be fixed, but the mouse isn't working. |
Jonatan Hedborg
Member #4,886
July 2004
|
you are giving it an int. It wants a fixed. use itofix(plater1_rotate) in the rotate_sprite last argument
|
|