hi i am new to unity and now i feel that i have got to grips with the interface i want to learn how to script, i have decided to start with making a simple first person controller that can look around with the mouse and jump e.c.t but i have tried looking on the internet and i have found that there are hardly no tutorials to show me how to. can somebody please post a simple script or a link to a tutorial that i will be able to understand thanks in advance.
asked Mar 07, 2010 at 01:42 AM
OK. Make a new GameObject. Add a CharacterController from Components>Physics, then a FPSWalker from Components>Scripts. Then attach a Mouse Look script from Components>Scripts>Camera Control to your Main Camera, and attach the Main Camera to the GameObject you made. Then read the scripts and figure out what they do.
answered Mar 07, 2010 at 02:30 AM
In Unity 4.5.3f3, a FPS controller and mouse look script is already available. First, you need to Import Package Character Controller
From the MouseLook.cs script:
To make an FPS style character:
-> Set the mouse look to use LookX. (You want to only turn character but not tilt it)
-> A CharacterMotor and a CharacterController component will be automatically added.
-> Set the mouse look to use LookY. (You want the camera to tilt up and down like a head. The character already turns.)