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 jhooks098 · Aug 03, 2012 at 06:22 AM · spherecoordinatesisometric

Dealing with coordinates on a spherical level

I'm trying to make a game that takes place on a small spherical stage but I'm having trouble figuring out how to go about the coordinates (polar/cartesian).

The game is from an isometric perspective with the camera following the character, and I need to know how I can move the character in specific up/down/left/right direction no matter the position on the sphere.

Here's a crude drawing of what I'm trying to achieve alt text

I've been playing around with modifying the coordinates using both Cartesian and polar coordinates but I haven't' been able to figure it out. What's the best way to go about achieving this?

sketch.jpg (22.4 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Fattie · Aug 03, 2012 at 03:59 PM

Fortunately the answer is very simple - it's the very raison d'etre of game engines!

Your character should be inside an "empty game object" called say MY HAPPY PLANE.

Now from the point of view of the game object, you need only locally rotate it or move it, and it does that IN TERMS OF MYHAPPYPLANE.

However, you can indpendently move "MYHAPPYPLANE" anywhere you want!

I was just doing a righ with a huge amount of confusing spinning around motion. But for the "character itself" it came down to nothing more than "moving in and out".

Imagine - oh - the piston in the engine of a car. it only moves "in and out". but if the car itself is tumbling, turning corners etc, the motino (in real ultimate space) is incredibly complex. however you only need to have "in and out" if you're a piston.

this is exactly what game engines do!!

So you're all set!

"never do trigonometry in a game engine, just use another empty object in-between for the concept"

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 ScroodgeM · Aug 03, 2012 at 08:12 AM

solution 1

store user's position in direction-like Vector3. on moving just rotate this vector around axis you need

solution 2

looks funny but easy to implement 8) rotate whole world and keep player in one position 8)
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

9 People are following this question.

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

Related Questions

How to use spherical coordinates in unity? 0 Answers

Map Google lat lng coordinates to sphere 1 Answer

Equirectangular Projection of Sphere onto Texture 2 Answers

Sphere texture bug 0 Answers

DAY and NIGHT Texture on Planet Earth 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