Hi, i'm implanting animations to my Chr extended class and i'm encountering a little pbroblem.
My Chr returns to point zero and animates well.
I precise that i've added an new "action" value to Chr class : ACTION_DIE (wich i set to 10 randomly).
It's managed in update extended func as this :
Code:
if(action==ACTION_DIE)
{
/* Vec p = pos(); */
cskel.clear().animate(L"../data/anim/walk.anim",Tm.time());
cskel.updateMatrix(MatrixIdentity /* + p */);
cskel.updateVelocities();
}
Commented code is a try i did to add position to MatrixIdentity to make Chr at good pos. It works but direction is not changed.
I also tried to get matrix by matrix() and add this to MatrixIdentity. It works too but Chr scale is really bigger.
I really dont think itake the good way plz give me the right one.