I am making a fps shooter and I need my enemy to follow me when I am with in a certain range of the enemy this is what I have so far.`
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MovetowrdsPlayer : MonoBehaviour
{
public GameObject Player;
public bool Speed;
public void Update()
{
rigidbody.velocity = transform.forward * Speed;
}
}
is this really the way
↧