Player move direction help

        moveDirection = transform.TransformDirection(moveDirection);
         moveDirection = (target - transform.position).normalized;
        moveDirection.y = 0;
        float myDirection = transform.rotation.y;
        Vector3 vectorDirection = Quaternion.Euler(0, myDirection, 0) * moveDirection;
        //moveDirection = transform.TransformDirection(Vector3.right);
        playerMove.MovePlayer(vectorDirection.x, vectorDirection.z);

5078306--499535--Новый точечный рисунок.jpg
need to convert direction based on current player rotation
like that:

moveDirection -= transform.rotation.y

5078306--499535--Новый точечный рисунок.jpg

transform.rotation.y doesn’t mean what you think it does and you basically shouldn’t use it under any circumstances ever (transform.rotation is a Quaternion, and the w/x/y/z parameters of a Quaternion have nothing directly to do with the x/y/z axes). You are probably thinking of transform.eulerAngles.y, though using that is still rather fraught.

If your goal is to get the direction directly behind the player, you should probably be using -transform.forward instead.