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-e03cc46cb475master
parent
b0988a33a6
commit
6a3127c8de
|
@ -1,6 +1,7 @@
|
|||
--------------------------
|
||||
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() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue