Move player (KinematicBody) to mouse_pos (Point & Click) 3D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bishop
:warning: Old Version Published before Godot 3 was released.

Hello,
I’m trying some prototyping for my project…3d- point and click action adventure from like helicopter cam. view.
I need a player position right? :
player_pos = get_node("player").get_translation().normalized
then…mouse click position but how?
var mouse_click = get_viewport().get_mouse_pos() ??? # I get null-null error
and finally player destination

var destination =  player_pos.origin - mouse_click ???

then

if Input.is_action_pressed("mouse_click"):
   destination = destination.normalized() * delta * walk_speed
   move(destination)

…all this on the KinematicBody script
and there is a rotation…better player facing when he start travel to mouse click position too.
So ,…thanks for every help,guys.

I recommend watch the example of point and click.
You get more easier your achievement if you use a Navigator node.

UnsignedFoo | 2018-01-03 17:28