A6ftMan
0
Q:

unity creating an enemy that follow player

 public float speed; private Transform target; // Use this for initialization void Start () {     target = GameObject.FindGameObjectWithTag("Player").GetComponent<Transform>(); }  // Update is called once per frame void Update () {          transform.position = Vector2.MoveTowards(transform.position, target.position, speed * Time.deltaTime);      }
0

New to Communities?

Join the community