raycast not updating

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By voidzeu

video: 2022-11-05 02-49-48

Raycast wont update immediatly when it’s not pointing at the object/pointing at the object

extends Node3D


func _process(delta):
    var get_collider = $Player/Head/Camera3d/RayCast3d.get_collider()
	
    if $Player/Head/Camera3d/RayCast3d.is_colliding():
	    if get_collider == $block:
		$Player/Head/Camera3d/looking_at.text = "looking at: block"
	else:
		$Player/Head/Camera3d/looking_at.text = "looking at: nothing"
:bust_in_silhouette: Reply From: CassanovaWong

Maybe if do it !$Player…/RayCast3d.is_colliding(:? Like check if not colliding and do something if true, righ? Sorry, my keyboard…broke