Original Post
Hello,
I cannot get local rotation work correctly. Here is what i do:
The result is rotation in a world space IMO.

instead of rotating with respect to rotation point in the left it rotates with respect to rotation point in the right. (The red dots)
Thanks,
Kasya
I cannot get local rotation work correctly. Here is what i do:
Quaternion quat;Matrix matrix;float rot = 0.01f;void Rotate() { rot+= 0.01f; quat.FromAxisAngle(rot, Vector3(0, 1, 0)); quat.ToMatrix(matrix); mesh->matrix = matrix; //mesh->matrix is identity in the beginning}void Render() { Matrix final = modelviewMatrix * mesh->matrix; program->setUniformMatrix(uniforms["modelviewMatrix"], final.row); program->setUniformMatrix(uniforms["projectionMatrix"], projection.row);}uniform mat4 modelviewMatrix;uniform mat4 projectionMatrix;attribute vec3 position;void main() { gl_Position = projectionMatrix * modelviewMatrix * vec4(position, 1.0);}The result is rotation in a world space IMO.

instead of rotating with respect to rotation point in the left it rotates with respect to rotation point in the right. (The red dots)
Thanks,
Kasya