private function generateDirection(Vector3 $pos) { return new Vector3($this->toFloat($pos->x - $this->x), 0, $this->toFloat($pos->z - $this->z)); }