Created
December 16, 2017 17:54
-
-
Save madigan/9638697509fce8e0712e836471f1d9e4 to your computer and use it in GitHub Desktop.
Simple controller script for Unity3D (5.x)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerController : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
this.transform.Translate(new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical")) * Time.deltaTime); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment