- Home /
my camera zooms when I hit the arrow keys - not sure how to disable
Hi - I vaguely remember setting something like this up when I was first learning unity, and now I can't remember how it happened - my camera zooms when I hit the arrow keys in Unity. I've searched through all my scripts for "GetKey" references and its nowhere to be found. The input manager doesn't seem to contain anything specific. Any idea this happened or what else I could be searching for to disable this behavior?
Thanks - yeah - I see a few of those. They are attached to my camera in two different scripts - I guess I don't fully understand what GetAxis does. I want it to control my character, not my camera, but it only seems to work when the script is attached to my camera.
Answer by Chris D · Jul 29, 2011 at 08:14 PM
Have you looked for GetAxis
references?
If you look through the manual entry for the Input Manager, you can see how to modify and set up new key and axis aliases. When you press a key that's associated with an axis, it's either on the +'ve side or the -'ve side. Take the arrow keys for example: the Up arrow is a +'ve input on the Vertical Axis whereas the Down is the -'ve on same.
To get data from an axis, you use Input.GetAxis. Check out the detailed usage docs and you'll have it down in no time.
Your answer
Follow this Question
Related Questions
How to use vuforia AR Camera for Zoom 1 Answer
Unity Editor control problems 1 Answer
A node in a childnode? 1 Answer
How to make a smash bros-like camera 3 Answers
Dynamic Orthagraphic Camera Zoom 1 Answer