I usually use the built-in FPS Controller from Unity, but I’d like to learn how to make one from scratch. Of course, I want it to be very simple. What are the steps to creating this? Can I do it in a single script attached to a camera? Any help is useful. Thank you!
I don’t know what your feature requirements for a FPS controller are. Unity’s FPS input controller that comes standard with Unity is built on top of a Character Controller. To get started building inputs into a CharacterController, see the example scripts in the reference page for CharacterController.Move():
https://docs.unity3d.com/Documentation/ScriptReference/CharacterController.Move.html
You would attach a character controller, then this simple script. It handles left/right/forward/back movement and jumping.
You could step back an build everything from scratch (no CharacterController). The biggest issue is collisions. You would need to add a lot of raycasting code to detect a collision since CharacterController-like scripts typically don’t use Rigidbodies and physics.
Look at other ones that have been made. Here is a good one. http://wiki.unity3d.com/index.php/FPSWalkerEnhanced