Commit 6a3127c8 authored by cutealien's avatar cutealien

Fix Collada (dae) export for objects with rotations around more than 1 axis.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5107 dfc29bdd-3216-0410-991c-e03cc46cb475
parent b0988a33
--------------------------
Changes in 1.9 (not yet released)
- Fix collada export for objects with rotations around more than 1 axis.
- Add ISceneNodeAnimatorCameraMaya::setTargetMinDistance and getTargetMinDistance.
- Add override font to IGUITreeView
- CGUIComboBox now updates selection-list when font changes while it's open (thx @ rubixcuber for bugreport)
......
......@@ -763,11 +763,15 @@ void CColladaMeshWriter::writeSceneNode(irr::scene::ISceneNode * node )
}
else
{
irr::core::vector3df rot(node->getRotation());
writeTranslateElement( node->getPosition() );
writeRotateElement( irr::core::vector3df(1.f, 0.f, 0.f), rot.X );
writeRotateElement( irr::core::vector3df(0.f, 1.f, 0.f), rot.Y );
writeRotateElement( irr::core::vector3df(0.f, 0.f, 1.f), rot.Z );
irr::core::vector3df rot(node->getRotation());
core::quaternion quat(rot*core::DEGTORAD);
f32 angle;
core::vector3df axis;
quat.toAngleAxis(angle, axis);
writeRotateElement( axis, angle*core::RADTODEG );
writeScaleElement( node->getScale() );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment