Hello I'm trying to raycast from the position of the mouse to something in the game world but it's not working. My code:
ray.set_enabled(true)
var camera = get_node("Target/MainCamera")
var from = camera.project_ray_origin(mousePos)
var to = camera.project_ray_normal(mousePos)
ray.cast_to = to
ray.translation = from
if ray.is_colliding() :
print("found")