Skip to content

Commit

Permalink
Merge pull request #49733 from Calinou/raycast3d-draw-double-sided-3.x
Browse files Browse the repository at this point in the history
Use double-sided material for RayCast (3.x)
  • Loading branch information
akien-mga authored Jun 19, 2021
2 parents 622f744 + 3143f5f commit aee507b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/3d/ray_cast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aee507b

Please sign in to comment.