Skip to content

Commit

Permalink
Include smooth surface to collision build in VoxelTerrain
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Aug 26, 2019
1 parent 507044c commit 7a7f5f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions terrain/voxel_terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,10 @@ void VoxelTerrain::_process() {
continue;
}

if (collidable_surface.empty()) {
collidable_surface = surface;
}

mesh->add_surface_from_arrays(data.smooth_surfaces.primitive_type, surface);
mesh->surface_set_material(surface_index, _materials[i]);
++surface_index;
Expand Down

0 comments on commit 7a7f5f6

Please sign in to comment.