I'm trying to write a character controller for a free-moving camera. I don't want it influenced by physics at all (no gravity, no collisions, no inertia). I've managed to get great movement in the X and Z axes with an Input.GetAxis call, but I'm at a bit of a loss for how to move the camera in the Y direction. I figured I should be able to use the Jump axis, but it isn't responding. Here's what I've got in my character controller update function:
float walk = Input.GetAxis("Vertical") * speed; float strafe = Input.GetAxis("Horizontal") * speed; float jump = Input.GetAxis("Jump") * speed; walk *= Time.deltaTime; strafe *= Time.deltaTime; jump *= Time.deltaTime; transform.Translate(strafe, jump, walk);
This seems simple enough to me, but the Jump button (space) does nothing. Also, possibly related, possibly tangential: when I go into the InputManager, it won't let me change the keys set for controlling the Jump axis. I can manipulate the values for gravity and sensitivity, but when I change what keys control the Jump axis, it just defaults back to space for positive and blank for negative once I click away from the box.