and here is the problem
Code: Select all
Bone *b = skelet->getBone(i);
int numAnimations = skelet->getNumAnimations();
for(int i=0;i<numAnimations;i++){
Ogre::Animation * anim = skelet->getAnimation(i);
anim->destroyNodeTrack(b->getHandle()); // <- destroy track
}
or should i copy the track and re add it later ? (my system potentialy should allow to manipulate any bone for some time span)
and the second question is about rotating ^_^ (i am not that good at rotations and stuff)
i have the followinf code
Code: Select all
b ... // bone
Vector3 pos = b->getPosition() + (ent->_getParentNodeFullTransform() * b->_getDerivedPosition()); // should get the world position for the bone ?
b->setOrientation(pos.getRotationTo(vLookAt)); // vLookAt - a world position vector.
//as for now i can see i don't encounter nodes current relative rotation
tnx and sorry for noobish questions.
