Jetro
Member
|
Animation
How to make animations that have the character played in a looped?
|
|
06-15-2010 05:15 AM |
|
menajev
Member
|
RE: Animation
ME->animation->toggle looping.
|
|
06-15-2010 07:36 AM |
|
Zervox
Member
|
RE: Animation
does never work me, only gets static poses inside the loop and I have to click toggle looping for each step.
|
|
06-15-2010 08:42 AM |
|
Driklyn
Member
|
RE: Animation
If you animate using the file path, turning looping on will work.
Code:
cskel.animate(L"Anim/player/dazed.anim", Time.time());
If you animate using the Motion class, this will work.
Code:
cskel.animate(motion, true);
cskel.updateMatrix(MatrixIdentity).updateVelocities();
motion.updateAuto(3, 3, Time.speed());
if (motion.is() && motion.time >= motion.skel_anim->length()) motion.time = 0;
|
|
06-15-2010 09:11 AM |
|
Jetro
Member
|
RE: Animation
Here is my code, but the animation for some reason does not play. What am I doing wrong?
Code:
void Zard::animate()
{
__super::animate();
cskel.animate(idle, true);
cskel.updateMatrix(MatrixIdentity).updateVelocities();
}
Bool Zard::update()
{
idle.set(cskel,"Obj/chr/Zard/idle.anim");
idle.updateAuto(3, 3, 1);
if (idle.is() && idle.time >= idle.skel_anim->length()) idle.time = 0;
return __super::update();
}
(This post was last modified: 06-17-2010 05:57 AM by Jetro.)
|
|
06-17-2010 05:56 AM |
|
Esenthel
Administrator
|
RE: Animation
when you call 'set' in each frame the motion always gets reset
|
|
06-17-2010 09:34 AM |
|
Jetro
Member
|
RE: Animation
Driklyn and Esenthel thanks!
|
|
06-17-2010 11:45 AM |
|