There seems not to be way to set the relative transformation matrix directly to a scene node. How do you recommend my to do this, I try to use Irrlicht with my self made rigid body physics. I just need to set the rotation part right. I can set position easily, but how do I set the rotation part to scene node?
// Set position works
vec3 t = mat.getTranslate();
body_node->setPosition( core::vector3df(t.x, t.y, t.z) );
// Sertting rotation to scene node (just trying something)
quat q; q.set(mat3(mat));
vec3 r;
q.to_rotation_vector(r); // quaternion to rotation operator
r *= 180.0 / PI;
body_node->setRotation( core::vector3df(r.x, r.y, r.z) );
Not very good result. It is somehow correct on certin angles, but far from correct
Thank you if you can (try to) help me