This image from stackoverflow thread perfectly shows what I need, but code from thread doesnt helps me . More conditions: ship can't do backward motion, using x, z coordinates (2d in 3d). Here is the code what i'm using, but it doesnt do all things what i'm need. Spoiler: C# Code Code (CSharp): using System.Collections; using System.Collections.Generic; using UnityEngine; [DisallowMultipleComponent] public class Movement : MonoBehaviour { // how fast the player moves. [SerializeField][Range(0.01f,2f)] public float speed = 0.05f; // where we want to travel too. private Vector3 targetPosition; // toogle to check track if we are moving or not. private bool isMoving; // a more visual description of what the left mouse button code is using const int LEFT_MOUSE_BUTTON = 0; /// <summary> /// Use this for initialization. /// </summary> void Start() { // set the target position to where we are at the start targetPosition = transform.position; // set out move toogle to false. isMoving = false; } /// <summary> /// Detect the player input every frame /// </summary> void Update() { // if the player clicked on the screen, find out where if(Input.GetMouseButton(LEFT_MOUSE_BUTTON)) SetTargetPosition(); // if we are still moving, then move the player if(isMoving) MovePlayer(); } /// <summary> /// Sets the target position we will travel too. /// </summary> void SetTargetPosition() { Plane plane = new Plane(Vector3.up, transform.position); Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); float point = 0f; if(plane.Raycast(ray, out point)) targetPosition = ray.GetPoint(point); // set the ship to move isMoving = true; } /// <summary> /// Moves the player in the right direction and also rotates them to look at the target position. /// When the player gets to the target position, stop them from moving. /// </summary> void MovePlayer() { transform.LookAt(targetPosition); transform.position = Vector3.MoveTowards(transform.position, targetPosition, speed * Time.deltaTime); // if we are at the target position, then stop moving if(transform.position == targetPosition) isMoving = false; Debug.DrawLine(transform.position, targetPosition, Color.red); } }