Jump to content
  • Advertisement
Sign in to follow this  
SirTwist

ArcBall in 3D space ?

This topic is 5040 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

Hi there, not sure if this topic has been covered before (can´t get the search engine to work today :( . But I looked at the ArcBall tutorial and liked it. So I took it and plugged it into some of my own code. Now I got it to work there and had to find out that it only works properly in 2D. I mean, the arcball reacts like it should only if you are looking at it down the z-axis. From any other angle it the rotations are wrong. Now I wanted to ask if there is a way to make it work even when the arcball is faced from a different angle. Maybe somebody had that same problem before ? I´d appreciate any help greatly. Thanks. Twist

Share this post


Link to post
Share on other sites
Advertisement
Are you talking about that NeHe tutorial where you click the mouse and you can rotate the ball thingy? If that is, in fact, what you are talking about, I'm sure I (or someone on here) can give you some pointers how to get it working about an arbitrary axis.

Share this post


Link to post
Share on other sites
Yes, that is what I am talking about. I already plugged the arcball into my program. And I was quite happy with it. Until I found what I mentioned above.

Would be glad for help.

Twist

Share this post


Link to post
Share on other sites
I have no problems with the arcball. It works properly in 3d. Sounds like you have a general problem with your rotations.

In my renderloop i do the camera transformations first and then glMultMatrix the arcball matrix-array i constructed with OpenGL's ModelView-Matrix.

Hope this helps a bit.

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!