animation - Bone Vertex Skinning transformation -
i trying implement skeletal animation in opengl. @ stage, trying have bone system deform mesh. believe problem how create matrix bone::getmatrix() . background: each bone has offset it's parent, , if bone not have parent offset instead world position of entire skeleton. collection of bones comprise skeleton. currently, testing purposes, have 3 bones in skeleton deforming skinned mesh. again, issue when deforming mesh, visual result not produce desired effect. code: glm::mat4 bone::getmatrix(){ bone* parent = getparent(); glm::mat4 rot = glm::mat4(1.0f); glm::mat4 trans= glm::mat4(1.0f); glm::vec3 orient = getorientation(); //create rotation matrix; rot *= glm::rotate(orient.x,1.0f,0.0f,0.0f); rot *= glm::rotate(orient.y,0.0f,1.0f,0.0f); rot *= glm::rotate(orient.z,0.0f,0.0f,1.0f); //create translation matrix if(parent != nullptr){ glm::vec3 off = offset; trans = glm::translate(off.x,off.y,off.z);