it's a little hard to explain so i tried to draw a little sketch :

the blue arrow is the animated x with a linked bone which rotates properly around the Y axis, and the green arrow is supposed to pick up the rotation from the bone, but it will not go below z<0
the code i have:
Code: Select all
irr::core::vector3df CreateGeometry::getBoneRot(std::string str){
irr::scene::ISceneNode* joint;
joint = node->getXJointNode(str.c_str());
return joint->getRotation();
}
//mainloop:
irr::core::vector3df rot = animNode->getBoneRot("Bone03");
node->setRotation(irr::core::vector3df(0,rot.Y,0));