Advertisement Jump to content
Sign in to follow this  
MetaKnight

Moving Along A Sphere

This topic is 4971 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!