My code works perfectly in rotating a cube around both axis’ (axees?)
My problem is that you have to continuously tap a key to get it to move in the desired direction, how do I make it so that holding the key down moves it in that direction continuously, rather than just once, and at the same speed.
Code:
var speed = 5000;
function Update ()
{
if(Input.GetKeyDown("left")){
transform.Rotate(0, 0, Input.GetAxis("Horizontal") * speed * Time.deltaTime,Space.World);;
}
Also, that “var speed = 5000” doesn’t actually seem to be changing anything, thats why it’s at such an insanely high number. How do i speed up the rotation?