41 glm::mat4
translation = glm::translate(glm::mat4(1.0f), position);
52 if (glm::length(
dir) > 0.0001f) {
56 rotation = glm::rotate(glm::mat4(1.0f),
angle, glm::vec3(0, 1, 0));
60 glm::vec3 forward = glm::normalize(glm::vec3(
baseMatrix[2]));
68 glm::mat4
correction = glm::rotate(glm::mat4(1.0f), glm::radians(90.0f), glm::vec3(1.0f, 0.0f, 0.0f));