After wrestling with it for many hours, here's my solution to getting my third-person controller to look at the mouse in 3D:
if event is InputEventMouseMotion:
var camera = get_node("../Camera")
var from = camera.project_ray_origin(event.get_position())
var to = from + camera.project_ray_normal(event.get_position()) * 1000
var space_state = get_world().direct_space_state
var ray = space_state.intersect_ray(from, to, [self,$guns],1, true, true)
var rayPOS = ray.get("position",Vector3(0,1,0))
if rayPOS.y != 0: #prevents look_at() alignment error
It works great, it's fast, and (I think) it's elegant. I would like to only rotate on the Y axis though.
Is there some way to lock the rotation on a certain axis without resorting to a dirtier solution?