ArcBall in 3D space ?

Started by
2 comments, last by hoLogramm 19 years, 5 months ago
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
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.

Why don't alcoholics make good calculus teachers?Because they don't know their limits!Oh come on, Newton wasn't THAT smart...
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
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.

This topic is closed to new replies.

Advertisement