View Full Version : animating movement
How does one animate movement between coords.
(only xy coords for simplicity)
Between 0.0,0.0 and 3.0,5.0 and then from there to 6.0,-2.0
PS. i AM incredibly clueless, so try to keep it simple :-) DS.
06-04-2000, 11:56 PM
I am not sure of the question, but perhaps a loop?!
I was thinking more in the ways of moving something along a 'path' but i dont know if this is possible.
If I get you right, you want to specify controlpoints along your path?
Then you can make a structure for each controlpoint, and it can look something like this:
float point; // controlpoint coordinates
float rotation; // the rotation for each controlpoint
... and so on
You also need a timevariable called t for example. To determine between what controlpoints you are, just use a=floor(t), and you know you are between point a and a+1. Then you just interpolate between those two points using t-a as interpolation factor
You can also use some other obscure methods to smoothly interpolate between two points, like Bezier and NURBS, cosine- and cubic interpolation.
If you are using a the above structure with all kind of information you want, you can animate a camera (for example), specifying camerapoint, camera targetpoint, upvector, fov and whatever you like, for each controlpoint. And using a real time variable, the camera will move from on point to another in the same time independant of your framerate.
Here are some places you can look at. http://www.flipcode.com/tpractice/issue03.shtml http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
Bob, you just made my heroes list :-)
Thank you !!!!!
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.