Merging r6426 through r6466 from trunk to ogl-es branch
Note: Updated IShaderConstantSetCallBack not yet supported by ogl-es drivers git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6467 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -1317,9 +1317,24 @@ void CSkinnedMesh::recoverJointsFromMesh(core::array<IBoneSceneNode*> &jointChil
|
||||
{
|
||||
IBoneSceneNode* node=jointChildSceneNodes[i];
|
||||
SJoint *joint=AllJoints[i];
|
||||
node->setPosition(joint->LocalAnimatedMatrix.getTranslation());
|
||||
node->setRotation(joint->LocalAnimatedMatrix.getRotationDegrees());
|
||||
node->setScale(joint->LocalAnimatedMatrix.getScale());
|
||||
|
||||
if ( joint->UseAnimationFrom ) // Seems to work better (else solution seems to mess up sometimes) and would be faster. Any disadvantage?
|
||||
{
|
||||
node->setPosition(joint->Animatedposition);
|
||||
core::quaternion qrot = joint->Animatedrotation;
|
||||
qrot.W *= -1.f; // Animation system uses right-handed rotations? Argh...
|
||||
irr::core::vector3df euler;
|
||||
qrot.toEuler(euler);
|
||||
euler *= core::RADTODEG;
|
||||
node->setRotation(euler);
|
||||
node->setScale(joint->Animatedscale);
|
||||
}
|
||||
else
|
||||
{
|
||||
node->setPosition(joint->LocalAnimatedMatrix.getTranslation());
|
||||
node->setRotation(joint->LocalAnimatedMatrix.getRotationDegrees());
|
||||
node->setScale(joint->LocalAnimatedMatrix.getScale());
|
||||
}
|
||||
|
||||
node->positionHint=joint->positionHint;
|
||||
node->scaleHint=joint->scaleHint;
|
||||
|
Reference in New Issue
Block a user