Created
November 5, 2016 16:05
-
-
Save gkye/42b4750908ed4651e7d33b032cc7b620 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Move Object | |
public float moveSpeed; | |
// Use this for initialization | |
void Start () { | |
moveSpeed = 1f; | |
} | |
// Update is called once per frame | |
void Update () { | |
var x = Input.GetAxis("Horizontal2") * moveSpeed; | |
var vertical = Input.GetAxis("Vertical2") * moveSpeed * Time.deltaTime; | |
transform.Translate(x * Time.deltaTime,0f,vertical); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment