diff --git a/src/coders/vec3.cpp b/src/coders/vec3.cpp index a6c68927..d6fb5c08 100644 --- a/src/coders/vec3.cpp +++ b/src/coders/vec3.cpp @@ -177,6 +177,13 @@ static Model load_model( util::Buffer chars(nameLength); reader.get(chars.data(), nameLength); std::string name(chars.data(), nameLength); + + glm::vec3 offset {x, y, z}; + for (auto& mesh : meshes) { + for (auto& vertex : mesh.vertices) { + vertex.coord -= offset; + } + } return Model {std::move(name), model::Model {std::move(meshes)}, {x, y, z}}; }