using System.Collections; using System.Collections.Generic; using UnityEngine; public class SabalyliLiikumine : MonoBehaviour { public GameObject juhtObjekt; void Start() { } // Update is called once per frame void Update() { Vector3 vahe=juhtObjekt.transform.position-transform.position; if(vahe.magnitude>1){ transform.position+=vahe*0.005f; } } }