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.
You know the CharacterController is one of the default assets, right?
and you can find a mouselook script somewhere without trying too hard.
Answer by Kiloblargh
Mar 07, 2010 at 02:30 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.
Answer by Akusan
Sep 01, 2014 at 05:51 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:
Create a capsule.
Add the MouseLook script to the capsule (Component -> Camera-Control -> Mouse Look)
Set the mouse look to use LookX. (You want to only turn character but not tilt it)
Add FPSInputController script to the capsule (Component -> Character -> FPS Input Controller )
A CharacterMotor and a CharacterController component will be automatically added.
Create a camera (GameObject -> Create Other -> Camera).
Make the camera a child of the capsule. Reset it's transform.
Add a MouseLook script to the camera.
Set the mouse look to use LookY. (You want the camera to tilt up and down like a head. The character already turns.)
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
1 Person is following this question.
The name 'Joystick' does not denote a valid type ('not found')
Material doesn't have a color property '_Color'
How to import the object from server to unity
Setting Scroll View Width GUILayout