Merge pull request #49724 from Calinou/raycast3d-draw-double-sided

Use double-sided material for RayCast3D
This commit is contained in:
Rémi Verschelde 2021-06-19 09:07:36 +02:00 committed by GitHub
commit f3c35f63e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -419,6 +419,8 @@ void RayCast3D::_update_debug_shape_material(bool p_check_collision) {
debug_material = material; debug_material = material;
material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); 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); material->set_transparency(BaseMaterial3D::TRANSPARENCY_ALPHA);
} }