Computer Science Canada [HELP] Having a picture turn |
Author: | Canned [ Mon Sep 15, 2008 8:40 pm ] | ||
Post subject: | [HELP] Having a picture turn | ||
Trying to make a game in my spare time, as I passed grade 10 computer sciences with flying colours, and I still love coding. Anyways, back on topic. How would I make a picture turn to follow the mouse? Like, if the mouse is north of the picture, it faces north, if the mouse is south, it faces south ect. Heres the code:
I know it'll have to do it with some trig, but I dont know how. Help = appreciated. |
Author: | The_Bean [ Mon Sep 15, 2008 9:27 pm ] | ||
Post subject: | Re: [HELP] Having a picture turn | ||
Is it a turing generated image using Draw. commands, or are you importing an actual image? Also do you want it to face only up, down, left, right, or do u want it to face your mouse for all 360 degrees. If you are importing a picture or making something complex, you will want to look into Pic.Rotate. He is an example of finding the angle, and drawing something at it.
|
Author: | Canned [ Tue Sep 16, 2008 7:15 am ] |
Post subject: | RE:[HELP] Having a picture turn |
Heh thanks man, +bits |