Code: Select all
ISceneNode* laser=smgr->addMeshSceneNode(laserMesh,0,0,location+direction*offset,rotation,vector3df(1,1,10),false);
matrix4 mat = matrix4(laser->getAbsoluteTransformation());
vector3df r1=mat.getRotationDegrees();
cout<<r1.X<<","<<r1.Y<<","<<r1.Z<<endl;
mat.setRotationDegrees(laser->getRotation());
vector3df r2=mat.getRotationDegrees();
cout<<r2.X<<","<<r2.Y<<","<<r2.Z<<endl;
Code: Select all
2.39263,0.489813,0.156511
22.6769,0.489813,0.156511
I'm using Irrlicht 1.6 due to some rendering issues in 1.7 that I can't find the source of. If this was fixed in 1.7, then sorry.