Merge pull request #52056 from jmb462/fix-raycast3D-color-update
[3.x] Fix Raycast3D color update when not colliding anymore (Fix #52051)
This commit is contained in:
commit
5ce734c073
@ -427,7 +427,7 @@ void RayCast::_update_debug_shape_material(bool p_check_collision) {
|
|||||||
color = get_tree()->get_debug_collisions_color();
|
color = get_tree()->get_debug_collisions_color();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_check_collision) {
|
if (p_check_collision && collided) {
|
||||||
if ((color.get_h() < 0.055 || color.get_h() > 0.945) && color.get_s() > 0.5 && color.get_v() > 0.5) {
|
if ((color.get_h() < 0.055 || color.get_h() > 0.945) && color.get_s() > 0.5 && color.get_v() > 0.5) {
|
||||||
// If base color is already quite reddish, hightlight collision with green color
|
// If base color is already quite reddish, hightlight collision with green color
|
||||||
color = Color(0.0, 1.0, 0.0, color.a);
|
color = Color(0.0, 1.0, 0.0, color.a);
|
||||||
|
Loading…
Reference in New Issue
Block a user