using System.Collections; using System.Collections.Generic; using UnityEngine; public class coliding : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } void OnCollisionEnter2D(Collision2D coll)//если 2D { if (coll.gameObject.tag == "enemy") { gameObject.transform.position = new Vector3(-8.62f, -0.78f, 0); } } }