Hey guys,
I am following the tutorial about roll a ball. To move I got this code:
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
void FixedUpdate ()
{
float MoveHorizontal = Input.GetAxis("Horizontal");
float MoveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3 (MoveHorizontal, 0.0f, MoveVertical);
rigidbody.AddForce (movement);
}
}
But what does “Horizontal” and “Vertical” means? And how does the game know that that means the arrow keys?
Thanks in advance!