summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-19 09:07:36 +0200
committerGitHub <noreply@github.com>2021-06-19 09:07:36 +0200
commitf3c35f63e615d54806cb78540b12cadd0f337730 (patch)
tree129ec457bca15aafb1b19b6345458644069068e0
parenta9c53fa5994db8badb4ec14581bd8422fb340f41 (diff)
parente98f5a53ad8ace968c373c2931b15c1f022b13c1 (diff)
Merge pull request #49724 from Calinou/raycast3d-draw-double-sided
Use double-sided material for RayCast3D
-rw-r--r--scene/3d/ray_cast_3d.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/3d/ray_cast_3d.cpp b/scene/3d/ray_cast_3d.cpp
index db841101e5..dfab3d4a17 100644
--- a/scene/3d/ray_cast_3d.cpp
+++ b/scene/3d/ray_cast_3d.cpp
@@ -419,6 +419,8 @@ void RayCast3D::_update_debug_shape_material(bool p_check_collision) {
debug_material = material;
material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED);
+ // Use double-sided rendering so that the RayCast can be seen if the camera is inside.
+ material->set_cull_mode(BaseMaterial3D::CULL_DISABLED);
material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA);
}