unity escape game code example
Example: object escape player unity
Vector3 dir = transform.position - Target.position;
transform.Translate(dir * moveSpeed * Time.deltaTime);
Vector3 dir = transform.position - Target.position;
transform.Translate(dir * moveSpeed * Time.deltaTime);