Computer Science Canada How do you make an image rotate using Pic.Rotate and mouse controls? |
Author: | mobin12 [ Mon Feb 06, 2012 8:01 pm ] | ||
Post subject: | How do you make an image rotate using Pic.Rotate and mouse controls? | ||
What is it you are trying to achieve? Want the image to rotate with the mouses position What is the problem you are having? can't get the image to rotate using the mouse
Please specify what version of Turing you are using Turing 1.4.1 |
Author: | Dreadnought [ Mon Feb 06, 2012 8:54 pm ] |
Post subject: | Re: How do you make an image rotate using Pic.Rotate and mouse controls? |
What have you tried? There's no evidence in the code you posted that you have tried anything. Read the documentation on Mouse.Where and Pic.Rotate if you don't know where to start. Also, you will need some understanding of trigonometry (nothing too complicated though). |
Author: | mobin12 [ Tue Feb 07, 2012 5:24 pm ] |
Post subject: | RE:How do you make an image rotate using Pic.Rotate and mouse controls? |
I know trigonometry but i dont know how i would use it here. |
Author: | mirhagk [ Tue Feb 07, 2012 5:48 pm ] |
Post subject: | RE:How do you make an image rotate using Pic.Rotate and mouse controls? |
You need to determine the angle that you need to rotate the picture. The x and y of your mouse, minus the x and y of the picture, makes a nice little triangle |
Author: | mobin12 [ Wed Feb 08, 2012 8:22 pm ] |
Post subject: | RE:How do you make an image rotate using Pic.Rotate and mouse controls? |
i dont understand. that is only two points thats not a triangle. |
Author: | mirhagk [ Wed Feb 08, 2012 9:11 pm ] |
Post subject: | Re: How do you make an image rotate using Pic.Rotate and mouse controls? |
![]() That should help you[/img] |
Author: | mobin12 [ Mon Feb 13, 2012 3:32 pm ] |
Post subject: | RE:How do you make an image rotate using Pic.Rotate and mouse controls? |
i cant see the image |
Author: | Dreadnought [ Mon Feb 13, 2012 4:04 pm ] | ||
Post subject: | Re: How do you make an image rotate using Pic.Rotate and mouse controls? | ||
It's odd that you can't see the picture, here's my attempt at representing it in in text. Picture the '/' as a diagonal line and the 'v' and '^' as arrows.
|
Author: | mirhagk [ Mon Feb 13, 2012 4:48 pm ] |
Post subject: | RE:How do you make an image rotate using Pic.Rotate and mouse controls? |
You need to look at your game like it's a cartesian plane (which it is). Draw things like this out on a sheet of graph paper, and figure it out. |