how do i reference two input axis at one time on javascript
im trying to stay one step ahead of my video game design class so i want to figure out how to get the rotation right and the scripting i have makes it move on both axis when i only have one button pressed heres my script now could you correct that please transform.Translate(0, Input.GetAxis("Vertical") speed Time.deltaTime, 0); transform.Translate(Input.GetAxis("Horizontal") speed Time.deltaTime, 0, 0); rotation=20; if(Input.GetAxis("Vertical")&&(Input.GetAxis("Horizontal"))) { transform.Rotate(0, 0, rotation * Time.deltaTime); } }
Comment