Hi,
I'm trying to raycast and have the following function:
`public override void _Process(double delta)
{
PhysicsDirectSpaceState3D space_state = GetWorld3D().DirectSpaceState;
Vector2 mouse_position = GetViewport().GetMousePosition();
Camera3D camera = GetTree().Root.GetCamera3D();
Vector3 ray_origin = camera.ProjectRayOrigin(mouse_position);
Vector3 ray_end = ray_origin + camera.ProjectRayNormal(mouse_position) * 2000;
PhysicsRayQueryParameters3D rayParams = PhysicsRayQueryParameters3D.Create(from: ray_origin, to: ray_end);
Dictionary hit = space_state.IntersectRay(rayParams);
GD.Print(hit.Keys);
GD.Print(hit);
}`
The problem is that the print statements print nothing. The goal is to make an object look in the direction of mouse position.