public class Target : MonoBehaviour
{
[SerializeField] Transform weapon;
[SerializeField]Transform target1;
void Start()
{
target1 = FindObjectOfType<Enemy_Mover>().transform;
}
void Update()
{
AimWeapom();
}
void AimWeapom()
{
weapon.LookAt(target1);
}
}
This is the exact same code but my tower canon doesnt rotate towards the walking enemy and I cant figure out why. Can someone help me?