Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 heroicsatsuma · Mar 09, 2012 at 02:10 PM · cameragameobjectlookatcenter

Camera rotate around sphere centre

Ok I'm having a bit of trouble trying to sort out my camera (It's the last thing to do!)

So I have a sphere and the player runs round the the sphere mario galaxy style. At the centre of the sphere is a game object with smooth look at script with the player as the target. The main camera is the child to another game object which has another smooth look at script only this time the game object in the centre of the sphere is the target.

Now in my head this should work and it does until the player gets to the other side of the sphere at which point the camera starts to zoom in closer? I have tried to use the constrain position tick boxes, but they have had no effect.

Any help in this matter would be much appreciated.

Comment
Add comment · Show 2
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 flaviusxvii · Mar 09, 2012 at 06:38 PM 0
Share

Wait.. why is the game object at the center of the sphere looking at the player and why is that game object relevant? It sounds like you need to move the camera around the sphere at a constant altitude to follow the player as he moves around it.

avatar image heroicsatsuma · Mar 12, 2012 at 10:35 AM 0
Share

The centre game object is relevant, so that the camera rotates correctly around the world - camera needs to constantly look at the centre of the world as well as stay locked to the player.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by DaveA · Mar 09, 2012 at 09:02 PM

I would really look at the MouseOrbit script in Standard Assets (or Camera Scripts or where ever they put it). The only thing I could suggest with what you are doing is make sure your 'center of the sphere' object is really at the center. And you shouldn't need the second object to have smooth look-at on it. The camera would just a child of the central object, offset to orbital height, and oriented back down toward the center.

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 heroicsatsuma · Mar 13, 2012 at 11:12 PM

found the answer! link text

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

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Placing a Gameobject in the exact Center of the Camera? (Closed) 1 Answer

GameObject doesn't turn on when renderer camera is visible. 2 Answers

How to make the camera is not break trough object? 2 Answers

GUI controlling other game objects 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