View Single Post
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 11-21-2012, 10:20 AM

Hint: If you rotate the camera to the right at a negative number, it turns left.

Answer: Find the total pixel length of the active screen (it's the value found from using the function [mouse distance from left edge] at the furthest right of the screen) and subtract half of that number from the to [mouse distance from left edge] function. For example, if there are 200 pixels in the window screen, then 100 would be half of that. If you are 120 pixels to the right of the left edge of the screen, then your camera will be rotating (120-100), which is 20 (right). If your mouse is 60 pixels from the left of the screen, your camera will be rotating at speed (60-100), which is -40 (left). You can then do the same thing with up and down.

Now you have to figure out how you are going to do that in Alice (remember that the window can be different sizes, so a fixed number like 100 for the midpoint will not always work if you change the active screen dimensions). This is just the theoretical explanation. If you are stuck and still don't know how to make it in Alice, I'll tell you how or you can ask me to make an example program for you.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote