I am using Input.GetAxis for a character controller, and this is the movement script (C#).
using UnityEngine;
using System.Collections;
public class CubeMove : MonoBehaviour {
public float speed = 500;
void FixedUpdate () {
Vector3 movement = new Vector3 (Input.GetAxis ("Horizontal"), 0.0f, Input.GetAxis ("Vertical"));
rigidbody.AddForce (movement * speed * Time.deltaTime);
}
}
This script works fine, but I wanted to add another player to control separately, and the GetAxis statement uses all three control schemes (WSAD, Arrow Keys, Gamepad Joystick) as input. How can I make the GetAxis function only use one control scheme as input?