Jump to content
  • Advertisement
Sign in to follow this  
MetaKnight

Moving Along A Sphere

This topic is 4816 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a Sphere and I can make an object move along the sphere like a ant walking around the surface. All the ant knows only the normal of the surface it's on. The problem is , how do I keep the forward direction of the ant, so that I can use that as the direction to transverse along the sphere?

Share this post


Link to post
Share on other sites
Advertisement
Well, the up vector would be from the center of the sphere to the ant; and the right vector wouldn't cnange, assuming a straight line. Using those, you could calculate the forward vector. I had to continually recompute orientation vectors for a camera in a similar project of mine this way. If there's a better method, I don't know it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!