First off, I'm sorry this is such a silly question, but for the life of me I can't seem to get it to work. And I've just spent the last hour trying to do so.
All I want to do is have my camera move up, in a smooth fashion, when I press the shoulder button on my joypad. I have it so that when I press the button, it jumps up. Not in a smooth movement.
The code I have is as follows:
float _maxY = 0.0f;
if (Input.GetKeyDown(KeyCode.Joystick1Button5))
{
_maxY++;
transform.Translate(0, _maxY, 0);
}
This is found within my update function. I've been looking for the answer to this for hours now, but can't find anything. Can anyone please help me?