This and the one in getJointPosition(const QString&) should either be: glm::vec3 position(0.0f, 0.0f, 0.0f); (spacing, floats rather than ints) or just glm::vec3 position; (vectors are initialized to zero by default).