diff --git a/libopenage/gamestate/game.cpp b/libopenage/gamestate/game.cpp index edad8076073..121bef4f566 100644 --- a/libopenage/gamestate/game.cpp +++ b/libopenage/gamestate/game.cpp @@ -135,8 +135,16 @@ void Game::generate_terrain(const std::shared_ptr &terrain_facto auto chunk1 = terrain_factory->add_chunk(this->state, util::Vector2s{10, 10}, coord::tile_delta{10, 0}); + auto chunk2 = terrain_factory->add_chunk(this->state, + util::Vector2s{10, 10}, + coord::tile_delta{0, 10}); + auto chunk3 = terrain_factory->add_chunk(this->state, + util::Vector2s{10, 10}, + coord::tile_delta{10, 10}); terrain->add_chunk(chunk0); terrain->add_chunk(chunk1); + terrain->add_chunk(chunk2); + terrain->add_chunk(chunk3); this->state->set_terrain(terrain); } diff --git a/libopenage/renderer/stages/terrain/terrain_mesh.cpp b/libopenage/renderer/stages/terrain/terrain_mesh.cpp index 88b471c22f5..b02f8670506 100644 --- a/libopenage/renderer/stages/terrain/terrain_mesh.cpp +++ b/libopenage/renderer/stages/terrain/terrain_mesh.cpp @@ -100,7 +100,7 @@ const std::shared_ptr &TerrainRenderMesh::get_uniforms() void TerrainRenderMesh::create_model_matrix(const coord::scene2_delta &offset) { // TODO: Needs input from engine auto model = Eigen::Affine3f::Identity(); - model.translate(Eigen::Vector3f{offset.ne.to_float(), offset.se.to_float(), 0.0f}); + model.translate(offset.to_world_space()); this->model_matrix = model.matrix(); }