Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by julesown · May 27, 2011 at 09:29 PM · movementmovethird-personthird-person-camera

3rd person camera controls

Hi

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.

cheers jules

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Ray-Pendergraph · May 28, 2011 at 12:46 AM

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 this already.

  • 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 have).

  • 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.

MouseLook plus

Mouse orbit

Smooth mouse look

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image spacelion88 · Dec 28, 2011 at 08:33 PM 0
Share

quoting Ray Penergraph: "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."

I am confused by that statement. I thought that was the standard for most 3rd person games. Limited degrees would seem like an unusual aberration.

avatar image
0

Answer by domtate123 · May 04, 2012 at 07:35 PM

HI there... 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... thanx

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by domtate123 · May 04, 2012 at 07:35 PM

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image midna · Apr 30, 2013 at 01:37 PM 0
Share

change the max speed in the inspector, close to "height" "distance" and so on.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Object moving OnTriggerEnter, please help?! 2 Answers

Moving AI away or towards player not working correctly. 1 Answer

Third Person Camera 1 Answer

How to stop coroutines or functions 2 Answers

Trying to Dash Using Standard Third Person Controller 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges