Im pretty new to unity but picking it up quickly.
Im building a 3rd person game and am using the spring follow camera script contained in the unity 3rd person tutorial which works great but i want to be able to use the mouse to look up and down as well as the arrow keys to move.
Ive tried but failed so would be great if someone give me a shove in the right direction as to what i need to add to the script to achieve this.
There are several ways you can make a “third person camera” and I am sure if you ask ten people you will get ten answers on this question. Here is one approach that I have seen used:
- A game object for the camera to
reside on that is not the same game
object as the character. It can be a
child of the character or a separate
game object all together; I have seen
this both ways. Sounds like you have
- A character controller on the
character for the arrow keys for
navigation. This roughly controls the
position of the camera in space
(because the camera follows its
target via the spring script you
- A mouse look script on a
separate game object with the camera
that controls the orientation (but
not the position) of the camera. This
script will accept input from the
mouse to alter the orientation of the
camera. There is a mouse look script
in Standard Assets and there are mouse look
scripts and many other of these
scripts on unifycommunity.com. I
would browse through there first.
What you have described is a little odd because free range to look on a camera that is not first person is a little unusual. What you might consider is a third person where the mouse input actuates a limited ‘spring style’ look of limited degrees but always looks over the shoulder or past the forward of the character. I have also seen configurations where the camera was offset from the character, look forward with or over the shoulder of the character but mouse input resulted in an orbit behind the character. You will just have to determine what’s the correct effect for your game and go with it. There is really no one correct way to do third person although someone on the wiki might have a ready made solution that you really like.
Smooth mouse look
I have created an animated character in daz and exported it… works perfectly… only one problem the character moves 5 times faster than the camera, and the camera cant keep up… when i stop moving the character, the camera stops then the character slids back to camera range…
any help here…
i have a query…
i have created a character in daz and imported into unity, works perfectly… only one problem… the character moves 5 times faster than camera, now when i stop moving character, the camera stops and the character slids backward to main camera position… this is a 3rd person game …
any help would apprecdiated…
i`m using UNITY 3.5.0f5 pro