?
Solved

3D Lingo: key control of camera view

Posted on 2003-11-02
5
Medium Priority
?
260 Views
Last Modified: 2013-12-24
Hi expert folks,

I want the following interaction in a movie:

The default view in a w3d world is, say view #1. Whenever the user presses the command/ctrl key, the camera view changed to view #2;  when the key is released within one second, the view changes back to view #1. But if the user keeps the key pressed, the view automatically changes back to the default view after one second.

Thanks.

idOle
0
Comment
Question by:idOle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 20

Accepted Solution

by:
MediaMacros earned 400 total points
ID: 9670828
Use a keyDown script and a timer.  Basically a movie script like this...

global gTimer

on keyDown me
  if the key = "2" then
    --swap your camera
    --set a timer value
    gTimer = the milliseconds
  end if
end

on keyUp me
  if the key = "2" then
    --it was released so set it back to camera 1
    gTimer = 0
  end if
end


Then you can either use a timeout object to track the time or use an exitFrame script like this...

on exitFrame me
  if gTimer = 0 then exit
  if gTimer + (1000 * 60) < the milliseconds then
    gTimer = 0
    --set it back to camera 1
  end if
end
0
 

Author Comment

by:idOle
ID: 9674513
I am not sure I am right but this seems not working for me. The problem is whenever the "ctrl" key is pressed, gTimer keeps updating to the milliseconds on "on Keydown" handler, instead of just being set once.

Any insights? Thanks.

idOle
0
 
LVL 20

Expert Comment

by:MediaMacros
ID: 9678571
Well this is pseudo-code, not totally written for your use.  Instead of key 2 look for the controlDown to see if ctrl is clicked.  
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question