diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-06-19 05:05:58 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-06-19 05:05:58 +0200 |
commit | e98f5a53ad8ace968c373c2931b15c1f022b13c1 (patch) | |
tree | 129ec457bca15aafb1b19b6345458644069068e0 /scene/3d | |
parent | a9c53fa5994db8badb4ec14581bd8422fb340f41 (diff) |
Use double-sided material for RayCast3D
This makes RayCast3Ds visible if the camera is fully inside one
(e.g. a RayCast3d parented to the current Camera3D).
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/ray_cast_3d.cpp | 2 |
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); } |