- Home /
How do I activate Input.GetAxis (Vertical) on an iMac?
I am on the first episode of TheFaceGrabber's GTA-V style game tutorial series. I finished the PlayerController script correctly. When TheFaceGrabber, who is using a Windows computer, starts the game, he taps something to make the character do the walk animation. I don't know what to click on an iMac. Can someone please help me?
I'm confused, you're asking in the title about Input.GetAxis but then you're not sure what button he pressed to make the character move? Did he program a move button, is he using a pre made script?
To answer the title question, Input.GetAxis("Horizontal") uses the left and right arrow keys and A and D. Input.GetAxis("Vertical") uses the up and down arrow keys and W and D.
I'm still confused about what you're problem is in your description.
$$anonymous$$y question was what I had to click on my $$anonymous$$ac keyboard to activate it.
And when I press W or D or the up and down arrow keys, nothing happens.
Show us your input code, it's quite not understandable.. Did you edit the "Horizontal" and "Vertical" axis?
We were only coding the "vertical".
using UnityEngine; using System.Collections;
public class PlayerController : $$anonymous$$onoBehaviour { public Animator Anim;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Anim.SetFloat("Speed",Input.GetAxis("Vertical"));
}
}
the arrows does not work? didi you also tried to Debug.Log(Input.GetAxis("Vertical")); to check if there weren't any other problems? $$anonymous$$aybe the problem is in your animator...
Answer by jtok4j · Jul 07, 2016 at 04:05 AM
I am assuming things from the title and the lack of details relating to the title, but you might want to check your project's Input settings, under project settings. Ensure there are "Axis" settings there for the Vertical axis portion.
Questions, just type away. :)
Your answer
![](https://koobas.hobune.stream/wayback/20220612083959im_/https://answers.unity.com/themes/thub/images/avi.jpg)