Merge pull request #49733 from Calinou/raycast3d-draw-double-sided-3.x

Use double-sided material for RayCast (3.x)
This commit is contained in:
Rémi Verschelde 2021-06-20 00:30:39 +02:00 committed by GitHub
commit aee507b532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -415,6 +415,8 @@ void RayCast::_update_debug_shape_material(bool p_check_collision) {
material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
// Use double-sided rendering so that the RayCast can be seen if the camera is inside.
material->set_cull_mode(SpatialMaterial::CULL_DISABLED);
}
Color color = debug_shape_custom_color;