diff options
Diffstat (limited to 'scene/3d/ray_cast.cpp')
-rw-r--r-- | scene/3d/ray_cast.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index 7f764a737a..616ab7cf40 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -362,8 +362,7 @@ void RayCast::_update_debug_shape() { return; Ref<ArrayMesh> mesh = mi->get_mesh(); - if (mesh->get_surface_count() > 0) - mesh->surface_remove(0); + mesh->clear_surfaces(); Array a; a.resize(Mesh::ARRAY_MAX); |