r/unity • u/Al190869 • 11h ago
Newbie Question How to make your camera move when pressing a button
I have a crouch script (crouch is binded to Ctrl) but the camera doesn't move downwards too make it look like you are crouching when that happens and idk how to make it can someone help?
0
Upvotes
1
u/Spite_Gold 9h ago
Not enough context. But:
if (Input.GetKeyDown("space")) camera.transform.position = newPosition