About Store Forum Documentation Contact
Donations:
225$/mo



Post Reply 
Animations to point zero
Author Message
Tupac Offline
Member

Post: #1
Animations to point zero
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. wink
07-26-2009 05:49 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
Re: Animations to point zero
please check the tutorials for custom animations

Chr::cskel.scale gives you character scale, Chr::angle gives you angles

for dying please check "bloody massacre" and "game basics/character ragdoll"
07-26-2009 07:24 PM
Find all posts by this user Quote this message in a reply
Tupac Offline
Member

Post: #3
Re: Animations to point zero
Hi again thanks for answering. I'm now using ragdollEnable() and it's really impresive !!
But i did not see all tutos for animation (forgot 2) i'll try that thx.
07-27-2009 09:07 PM
Find all posts by this user Quote this message in a reply
Post Reply