소스 검색

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

Use double-sided material for RayCast (3.x)
Rémi Verschelde 4 년 전
부모
커밋
aee507b532
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      scene/3d/ray_cast.cpp

+ 2 - 0
scene/3d/ray_cast.cpp

@@ -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;