FPS controller

Hello,

Is there any efficient script to control the FPS controller, i have tried many but it feels some glitch and lags specially when running!
i hope i can get a clear simple enough script without having to download assets because you get somehow confused.

Much Appreciated,

Off the top of my head, you want to grab the horizontal (generally a, d) and vertical (w, s) inputs and then transform your camera based on that. The transform would probably look something like this (pseudocode):

float xPos += horizontal axis;
float zPos += vertical axis
camera.transform.position = new Vector3(xPos, camera.transform.position.y, zPos);

You might want to use a lerp in which case add Vector3.Lerp( before new Vector3.
For the rotation of the camera you’ll want that to be the change in position of the mouse. This might be some help: unity - How to use Input.GetAxis("Mouse X/Y") to rotate the camera? - Game Development Stack Exchange

Ellie97
Thank you, good explanation.
Is there a pure full of code no models are required, just FPS controller and Camera!

Much Appreciated,

Ellie97
Thank you, good explanation.
Is there a pure full of code no models are required, just FPS controller and Camera!

Much Appreciated,