   timing walking animation with camera movement
  I have an animation .x called tiny from the sdk righthow do you set the walk speed based on how long you hold the camera walk button for like you start really slow then as you hold down w , he moves faster i cant seem to get it working right , i know how to slow and speed up the animation just not make it increase based on walking time etcheres a video to show you what i meanthanks if you can help[Edited by - Anddos on May 24, 2010 3:18:48 AM]
  Do you mean how do you switch from one animation loop to another?The general practice is to have an idle animation and then play the walking animation only while W is pressed or while the character is moving. If you mean how to start the animation slowly and then speed up then I would think the best way would be to have some value currentSpeed set to 0 and then each frame increment it by a certain amount until it reached max speed. You could then use this value as the speed for the animation.   ;  It sounds like you want Tiny to walk faster depending on how long you've held down the W key. Is that correct?Usually animation speed is synced to real-time but if you want to try it (I've not done this myself), you might try something like:deltaTime = maxAnimDelta - maxKeyDownTime;if (W-not-down) keyDownTime = 0;else {   if (keyDownTime < maxKeyDownTime) keyDownTime += someSmallIncrement;   deltaTime = maxAnimDelta - (maxKeyDownTime - keyDownTime);}animCtrl->Advance( deltaTime );Assuming you have a frames/sec of 30 FPS, try something like:// normal delta speed = 1/30 = 0.0333 secsmaxAnimDelta = 0.066f; // max speed = twice normal speedmaxKeyDownTime = 0.033f; // when keyDownTime==0, deltaTime = 0.033someSmallIncrement = 0.001f; // maybe smaller?You can play around with those 3 numbers to see what you like.   