From 7a7f5f679bf9bba3c782f9af4a4689c90151f32f Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Mon, 26 Aug 2019 14:00:48 +0100 Subject: [PATCH] Include smooth surface to collision build in VoxelTerrain --- terrain/voxel_terrain.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terrain/voxel_terrain.cpp b/terrain/voxel_terrain.cpp index db49d5432..f57eac823 100644 --- a/terrain/voxel_terrain.cpp +++ b/terrain/voxel_terrain.cpp @@ -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;