]> git.localhorst.tv Git - blank.git/blobdiff - src/entity.cpp
limit chunks allocated/freed per frame
[blank.git] / src / entity.cpp
index cd2491f1bdf441282ea666a6f15218075b9ac6b6..c572429067c6e0dd77bd4a21ac9e1dde7c864b14 100644 (file)
@@ -57,7 +57,7 @@ void Entity::Rotation(const glm::mat4 &rot) {
 }
 
 glm::mat4 Entity::Transform(const glm::tvec3<int> &chunk_offset) const {
-       const glm::vec3 chunk_pos = glm::vec3(chunk - chunk_offset) * Chunk::Extent();
+       const glm::vec3 chunk_pos = (chunk - chunk_offset) * Chunk::Extent();
        return glm::translate(position + chunk_pos) * rotation;
 }