i have function called SendRaycast() and i want to call it every frame … or at least very often right now it’s called whenever the object comes out of the if’s inside update … dunno how to achieve what i want
here is the code:
void Update () {
chaseTarget = GameObject.FindWithTag("Player").transform.position;
SendRaycast();
if( isBlinded == true) {
StartCoroutine(BlindedBehavior());
}
else if(chase == true) {
Chasing();
}
else if(checkNoise == true chase == false) {
CheckNoise();
}
else {
Patroling();
}
}