You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
487 B

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<Rigidbody>().AddForce(transform.forward * speed);
}
// Update is called once per frame
void Update()
{
}
}