using System.Collections; using System.Collections.Generic; using UnityEngine; public class fire : MonoBehaviour { public float speed = 1f; // Start is called before the first frame update void Start() { GameObject target = GameObject.Find("target"); transform.LookAt(target.transform.position); GetComponent().AddForce(transform.forward * speed); } // Update is called once per frame void Update() { } }