I am attempting to use ODE physics and Horde3D but am having considerable problems with orientating the object within the world.
Code:
// get the possition, offset of bounding box and orientation
SGZVECTOR pos = ODEWorld->getPos(odeIndex);
SGZVECTOR offset = ODEWorld->getOffset(odeIndex);
const float* q = ODEWorld->getQuaternion(odeIndex);
// create matrix's
Matrix4f mat = Matrix4f();
Matrix4f qMat(q);
// perform matrix concatination
mat.translate(-offset.x, -offset.y, -offset.z);
mat = mat * qMat;
mat.translate(pos.x, pos.y, pos.z);
// place object
bool temp = Horde3D::setNodeTransformMatrix( (NodeHandle)lua_tonumber(Lua, 1), mat.x);
there are very weird effects of the objects appearing to scale in iratic fashions though without the quaternian matrix being taken into acount the objects are placed correctly