Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Zoom?
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Unhappy Zoom? - 06-18-2008, 11:22 AM

hi, i m trying to make a game where you can zoom onto an object with the camera using the key Q, but i don't want to just tell the camera to go forward 50 meters (the zoom), because you can overshoot the object you are zooming on and not see it.

is there a way to make it so it looks closer, but the camera isn't actually moving?

hope someone knows

RICK


im back!!! FINNALY!!! got windows working on my mac again!!!
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 06-18-2008, 01:21 PM

Quote:
Originally Posted by rich0e0rick View Post
hi, i m trying to make a game where you can zoom onto an object with the camera using the key Q, but i don't want to just tell the camera to go forward 50 meters (the zoom), because you can overshoot the object you are zooming on and not see it.

is there a way to make it so it looks closer, but the camera isn't actually moving?

hope someone knows

RICK
In the upper-right of the development screen, there is a control for lens angle. I don't know how to use program code to control it, but if that is possible, it will act as an optical zoom.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 06-18-2008, 04:10 PM

Quote:
Originally Posted by DickBaldwin View Post
it will act as an optical zoom.
Among the camera's "seldom used properties" are controls for both vertical and horizontal viewing angles and these can be changed under program control like any other object parameter. I've attached a short example program.

These camera properties are controlled in edit mode by the aspect ratio and lens angle controls Dick mentioned. The easiest way to see the relationships between the controls and the parameters - and the effect they have on the view from the camera - is just to experiment in edit mode. The math controlling the relationships just consists of some fairly simple geometric calculations - but conceptualizing the view itself is a bit difficult.
Attached Images
File Type: jpg Zoom.JPG (61.3 KB, 73 views)
Attached Files
File Type: a2w Zoom.a2w (219.8 KB, 88 views)
   
Reply With Quote
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Cool 06-18-2008, 08:49 PM

thanks a million Dr Jim, ill work on my project tomorrow after work, i tried your way, it works great, ill just have to make the zoom stronger and faster....
ill change the 0.5 to a 0.1 and change the duration... i hope it wont affect the camera angles... we'll see...

thanks again Dr Jim.

ill let you know if it works

p.s. thanks Dickbaldwin for your help as well...

Rick



im back!!! FINNALY!!! got windows working on my mac again!!!
   
Reply With Quote
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Talking 06-18-2008, 10:06 PM

Yes, i figured it out, it looks great.... thanks guys for all your help, i had to change a lot of it, but its the best!!!!

thanks

p.s. so much for doing it tomorrow...

Rick


im back!!! FINNALY!!! got windows working on my mac again!!!
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.