Possible to mix animations?
Possible to mix animations?
I tried to search the forums on this but couldn't really find anything useful. I'm wondering if it's somehow possible with irrlicht, to mix several animations on a scene node? I have a model that has a run animation, and an attack animation, and i'd like to mix the animations so that when player is running, only the arm bones change the animation if the player attacks, so that the rest of the body is still using the running animation.
as for me, i have the mesh with full bones, doing some animations.
and i have an other mesh what not contains meshes, only the lower part joints (what you want to mix)
and in every frame, change the original mesh's bones.
dunno if its the fastest way, but it works.
ohh and, the jointmode have to be EJUOR_CONTROL.. maybe xD
and i have an other mesh what not contains meshes, only the lower part joints (what you want to mix)
and in every frame, change the original mesh's bones.
Code: Select all
for (u32 n = 0; n < lowerAnimNode->getJointCount(); n++)
{
IBoneSceneNode* toChange = lowerAnimNode->getJointNode(n);
IBoneSceneNode* changeNode = body->getJointNode(toChange->getName());
if (changeNode)
{
changeNode->setRotation(toChange->getRotation());
changeNode->setPosition(toChange->getPosition());
}
}
ohh and, the jointmode have to be EJUOR_CONTROL.. maybe xD