c# scripts

Moving Camera with WASD

Human
April 02, 2014
0 Comments
Home
c#
scripts
Moving Camera with WASD
.
float xAxisValue = Input.GetAxis("Horizontal");
    float zAxisValue = Input.GetAxis("Vertical");
    if(Camera.current != null)
    {
    Camera.current.transform.Translate
(new Vector3(xAxisValue, 0.0f, zAxisValue));
    }

Blog authors

No comments