- Home /
Animator: Adjust speed of Animations at every keyframe?
Hey, let's say I wanna model something like this http://img.td-imgs.com/images/27/03/212703_1350094_FTY-212703.jpg with a Hand Animation where you can see the finger pressing down the catapult. The catapult is shot when the User swipes over the screen. Depending on how fast he swipes the catapult is supposed to shoot faster. I got all of this running, only the Finger Animation doesn't follow always smoothly. What I am tryng to achieve is that every frame a user swipe input is noticed, the finger moves with a speed according to the swipe velocity. So in the "PointerFingerDown" and "PointerFingerUp" Animation I want to play the animaton up to the point which is closest to the current catapult position (smoth follow). There I could use the transform of every Animation. Any idea how to realize that?
EDIT: To explain it a little bit better: Of course I could just set Animator.speed
according to the swipe velocity within the first frame but that requires the swipe velocity to remain constant in the following frames. Basically I want to check in every frame the catapults rotation (due to added Torque by the swipe) and find the keyframe of the finger animation which looks best (closest)