• 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 MrStopTeme · Jun 13, 2015 at 07:07 PM · camera rotatecamera follow

Third person ball controller

I've seen people asking this question before, and many answers that didn't help me at all. I want to make a 3rd person camera that follows a rolling ball (aka the player), rotating around the ball (using the mouse). I've seen some good scripts before, but the only thing about them is that the camera shakes a lot since the camera starts rotating as the ball is rotating. (because the camera follows the rotation of the ball as well) My question is: How do I make a third person camera so that the ball rotates after the camera, the camera rotates with it, but the camera doesn't rotate after the ball? Is it possible? Let me put it this way: the camera has to rotate in air after the ball, but just on the Y axis, and the ball has to be able to roll around without the camera actually rolling like the ball, but just following it in the air. If the ball goes to right, the Y axis of the camera moves with it, so it follows it. Also, I'm a newbie with the scrips, so if you can show me concrete examples, it would be the best. Thanks!

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by habsi70 · Jun 13, 2015 at 10:44 PM

This seems to be covered in the Unity - Roll a ball Tutorial in the chapter "Moving the camera": https://unity3d.com/learn/tutorials/projects/roll-a-ball/moving-the-camera

There you will find a simple script attached.

In short they do not follow the balls rotation. You can set up your own rotation around the ball. You could parent the camera to an empty gameobject which follows the exact position of the ball. Offset the camera by the desired distance, then rotate the cameras parent around the y axis.

I hope this is helpful :)

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 UY505 · Jun 24, 2015 at 12:18 AM 1
Share

That link has nothing to do with what we've all been asking. In that link, the guy shows how to make the camera follow the ball. But the camera always looks at the same direction. When the ball turns, the camera moves left or right with the ball but still faces the same direction. What we need is for the camera to always look in the direction that the ball has turned to.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Problem in rotating camera around a moving player 1 Answer

How to make the camera move up and down 0 Answers

Fixed-Position Camera that follows player,Fixed Position Camera that follows target. 2 Answers

change objects Axis to match cameras rotation 0 Answers

Rotate camera around object with camera follow 1 Answer


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