Jump to content
  • Advertisement
Sign in to follow this  
Mark Tanner

Fading a keytrack speed in or out.

This topic is 5197 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, I have a simple keytrack function working, where say an object can move along a set of position keys along the track; where each key has it's time. For example a track with 3 keys: the first at time 0.0f and position Vec3(0,0,0), key 2 at 2.0f seconds and position (20,0,20) and the last key at 5.0f secs. and position (50,0,50). Track generation is automatic. I just supply the total track time (in this case 5 seconds, the num. of keys and their position and the function generates the key times. The thing is that I want to be able to fade the track speed in or out, still using a simple linear interpolator to keep things simple. Without fading it's simple: a keytime is (distance/tot distance) * totTrackTime. But how would I handle fading this in or out? (So that for example the first key in the above example wouldn't be at 2.0 secs. but at say 2.5 secs.?) The total track time should of course remain the same. Many thanks for any feedback! Mark

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!