Archived

This topic is now archived and is closed to further replies.

Crispy

interpolation mechanism problem

Recommended Posts

Hi, the problem I have is slightly difficult to explain, but I hope someone knows what I''m talking about here. I''m writing a 3d interpolator - a thing which that takes a bunch of waypoints and then moves an object (the camera) along those waypoints. So far everything is crystal clear, but I''m a little stumped with the roll element (banking sideways). To implement roll, I have to change the up-vector''s x, y and z values (in OpenGL). I''m calculating these as follows: a waypoint consists of the position, orientation and the roll factor (a simple angle), and time. Depending on the axes the interpolation point is moving on, I have to change either the x and y or the z and y elements of the up-vector (I''m not 100% clear as to why yet...), otherwise I get very jerky roll on one of the axis. Furthermore, waypoints can have any valid coordinates, so the vector along which I''m moving can be in any direction. I hope that''s enough info to actually present the question in a clear form now: how do I calculate the x and z factors for the up-vector to get rid of the jery movement? Or, is there an alternative, easier way? If necessary, I can post some code. Any help would be appreciated, Crispy

Share this post


Link to post
Share on other sites