CQ5
CQ5
Q1
In the following video, we see the player shooting at the character's knee and then the character begins to limp. The knee joint in effect seems to have stopped being considered by the solver after being shot:
In not more than a single sentence, describe how one might be able to achieve this limping effect for their characters in a game. State both the choice of solver (FK or IK) and the implementation required for simulating limping. (Hint: an iterative error-minimizing algorithm)
To achieve a limping effect, use an IK solver with an iterative error-minimizing algorithm like CCD to disable or restrict rotation on the damaged knee joint, forcing the solver to adjust the rest of the leg joints accordingly to simulate limping.
Q2
In Pokemon Go, if you tap on a pokemon you have caught, it plays a small animation for that pokemon, e.g.:
If you tap it multiple times, specially before the entire animation for that pokemon could finish playing, you get something like this:
Your favourite TA Joanna wanted to replicate this smooth replaying feature of the animation for her own use case, and wrote the following pseudo code:
if (anim.isPlaying() ) {
anim.stop();
anim.reset();
anim.play();
}
else {
anim.play();
}
Now answer the following questions in not more than a single sentence:
- Why do you think Joanna's pseudo-code will not work?
- What instead should she do that would avoid the problem you mentioned in the previous answer and get the smooth blended effect of the repeating animation as seen in the video?
Correct
- Joanna's code won't work because stopping and resetting the animation creates abrupt jumps.
- She should transition the animation by blending from the current frame to the beginning using an animation blending function.