(LOL I promised myself I’ll call it a day and play Palworld for the night, but here we are…)
OK so, as the title suggests, for a while now I’ve been stuck with the old trigger-based enemy targeting system. You can sneak up from behind an enemy for example, and miraculously, he would know you’re behind him (although he can’t see you, and let’s say he also can’t hear you (for now…)), turn around, chase and try to attack you
I wanted to change that a bit and make it a vision-based system, so if and only if you’re in his field of view (later on I might add hearing footsteps if I ever get a ‘PlayerCrouchingState.cs’ state machine integrated), and you’re in his targeting sphere, and he’s considered aggressive (activated by a boolean), can he see and chase you. How can we go around that? (Doing that in ‘AIController.cs’ would’ve been fairly simple, but in state machines…? It raised my eyebrows)
My guess is, that code goes in ‘EnemyPatrolState.cs’ and/or ‘EnemyIdleState.cs’