• 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 ina · Oct 27, 2012 at 07:32 AM · sphere

Great circle trajectories around a sphere

What's the best way to calculate great circle trajectories, knowing the velocity (tangent to sphere) of an orbiting object?

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
3
Best Answer

Answer by Fattie · Oct 27, 2012 at 08:50 AM

just draw a straight line (ie through the planet)

simply raise that to be a tangent to the surface

(go away from the center of the sphere until 90 away)

Hey Ina - do you need more than this? This is exactly how you do it. It's remarkably easy in Unity.

It was a lot harder for navigators in the 1800s! :)


You further wanted to know how to do this using built-in functions.

 direct line = B - A

(use the built-in subtraction of Vector3)

 AToCenter = planetCenter - A
 temp = direct line X AToCenter
 final result = AToCenter X temp

the large "X" represents Cross Product which is an operation between Vectors. Cross Product is built-in to Unity:

http://docs.unity3d.com/Documentation/ScriptReference/Vector3.html

Comment
Add comment · Show 7 · 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 Bunny83 · Oct 27, 2012 at 09:15 PM 0
Share

+1 ;)

It's actually a quite off-topic question since it has nothing to do with Unity. As you said it's a pure mathematical problem.

Besides that the velocity of an object is never ever enough. The only reason why an object is orbitting another is the gravity. Therefore without the distance between the center object and the orbitting object and the mass of both, this isn't going anywhere.

Next thing is most the time an orbitting object doesn't really move on a great circle. It's usually an elliptic route unless the parameters (distance, mass, velocity) are very well choosen.

In this case when you really move on a great circle, simple trigonometry should be enough since it's just a circle.

I can just copy what Fattie said: We need more information!

avatar image ina · Oct 29, 2012 at 01:53 PM 0
Share

Well, it's a game question... Angry Birds but with planetary orbits. Continuing the analogy, the goal is to hit a pig on the "other side of the planet", after sending the bird into orbit...

I have several ideas on how to implement this but they're all very complicated. There's got to be an easier way.

avatar image DaveA · Oct 29, 2012 at 03:36 PM 0
Share

I loved Angry Birds Space. Are you remaking that?

avatar image ina · Nov 11, 2012 at 12:19 PM 0
Share

So basically, direction to move is always $$anonymous$$esh.tangent, or is there another way to get the tangent to the surface? @DaveA I'm just exploring for now, trying to figure out the best way to make these things in Unity

avatar image Fattie · Nov 11, 2012 at 12:30 PM 0
Share

the tangent to a sphere is a PLANE so your comment is meaningless.

the tangent of the mesh is largely irrelevant here, I don't see how it could help in any way.

to simply re-type what I typed above:

(1) make an imaginary straight line (ie, it will go through the planet) between the begin point and the end point. in other words it will look like an incredibly long, shallow, tunnel between the two points.

(2) now raise that line until it is on the tangent PLANE at the begin point. in other words, obviously, make the angle between center-begin and begin-end, a 90 degree right angle.

if you struggle with the math for this, I don't really know if it's the forum for a huge beginner geometry math intro you know. Also you never say thanks, so not many people want to do that.

to "make it a right angle" just use the usual trick of crossing twice. the first cross will give you a arrow, on the tangent-plane, but pointing 90 degrees away fromt your desired destination. just cross again to get your desired destination.

so (1) is nothing more than vector3 = B - A

and (2) is nothing more than temp = 1 X begin, result = temp X begin, result=-result

(I think I have the negative correct, recall unity is left handed in crosses)

Show more comments

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

12 People are following this question.

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

Related Questions

Using WASD keys instead of mouse to roll ball? 1 Answer

Inserting a 3d object inside an other 0 Answers

Car driving in a spherical world. 2 Answers

How to create a spherical navigation? 1 Answer

Problems with an object rotating a sphere surface (Quaternions and LookAt) 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