diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index d3b4577c429..d24aa6ae2a2 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -146,7 +146,7 @@ void RayCast::_notification(int p_what) { _update_raycast_state(); if (prev_collision_state != collided && get_tree()->is_debugging_collisions_hint()) { if (debug_material.is_valid()) { - Ref line_material = static_cast >(debug_material); + Ref line_material = static_cast >(debug_material); line_material->set_albedo(collided ? Color(1.0, 0, 0) : Color(1.0, 0.8, 0.6)); } } @@ -258,10 +258,10 @@ void RayCast::_bind_methods() { void RayCast::_create_debug_shape() { if (!debug_material.is_valid()) { - debug_material = Ref(memnew(FixedSpatialMaterial)); + debug_material = Ref(memnew(SpatialMaterial)); - Ref line_material = static_cast >(debug_material); - line_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true); + Ref line_material = static_cast >(debug_material); + line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true); line_material->set_line_width(3.0); line_material->set_albedo(Color(1.0, 0.8, 0.6)); }