So I've tried using the input_event of the static bodies themselves to gather input, but that's not working. However, code in _physics_process is returning the right location. I'm curious how I would handle mouse button input within _physics_process?

func _physics_process(delta) -> void:
	var space_state = get_world_3d().direct_space_state
	var mousepos = get_viewport().get_mouse_position()

	var origin = camera.project_ray_origin(mousepos)
	var end = origin + camera.project_ray_normal(mousepos) * RAY_LENGTH
	var query = PhysicsRayQueryParameters3D.create(origin, end)

	var result = space_state.intersect_ray(query)
	print(result)

    Lousifr you have to get the events in the input_events function and store them in a variable.

    func _unhandled_input(event):
    	is_event_mouse = event is InputEventMouse
    	if is_event_mouse:
    		gpos = event.global_position
    		is_mouse_click = event.is_action_pressed("left_click")

    you can also use Input to access events in physics_process:

    Input.is_action_just_pressed("mouse_click")