A simple "flying camera" for Unity using the new InputSystem.
Drag and drop onto Camera
key | action |
---|---|
w/a/s/d | basic movement |
shift | Makes camera accelerate |
e/d | vertical movement |
space | Moves camera on X and Z axis only. So camera doesn't gain any height |
right mouse button | Hold to change View |
I originally found this code deep in a github discussion but forgot where. Since I had to rewrite the script so that it works with the new input system, as well as making some other QoL changes in the process, I figured it wouldn't hurt to post the new one somewhere.
MIT