jakotheshadows
Member
|
Animation Pausing
I want to pause characters in mid animation to achieve an the effect that they have been frozen in the middle of what they were doing. So if an npc is running when it gets frozen, it is still in the middle of the running animation but not moving. Any thoughts on this? Right now we're using the Game::Chr::actionBreak() function, which just stops the animation and brings the character to its idle state.
|
|
11-10-2012 07:44 PM |
|
Rubeus
Member
|
RE: Animation Pausing
What I did:
1) add Flt time; outside of the update function, set it to 0 in init().
2) adjust the animation code to instead of using Time.time() like the tutorial, something like: cskel.animate(L"../data/anim/walk.anim", time);
3) add time += Time.d(); to when you want the animation playing(leave it at the previous value when you want the animation 'frozen'). When you change animations, set time back to 0.
Is that what you were looking for?
|
|
11-10-2012 11:09 PM |
|
jakotheshadows
Member
|
RE: Animation Pausing
I just ended up only running the body of my animate function under the conditions I wanted, otherwise I skipped it. Thanks for the advice though.
|
|
12-05-2012 03:20 AM |
|