Everything turned out to be quite simple.
The variant from the English-language source did not fit, since it was intended for a script that was attached to a moving object. Hence the use of transform.position .
In my case, the control script is hanging on another object.
Therefore, the script looks like this.
if (Input.GetMouseButton(0)) { ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out hit) && hit.collider.CompareTag("fishka")) { Collider col = hit.collider; var dir = (hit.point - col.transform.position); // Используем координаты коллайдера rot.z = hit.point.z; rot.x = hit.point.x; col.attachedRigidbody.velocity = new Vector3(dir.x, 0, dir.z) * speed; Debug.Log(hit.point + " hitpoint"); Debug.Log(transform.position + " transform.position");