First of all, I want to apologize in advance if anything I write sounds strange or unclear. English is not my native language, so I’m doing my best to explain my issue clearly. Please bear with me, and feel free to ask for clarification if needed!
I’ve been working on a chasing detection system for my game, where I calculate the distance between the victim and the monster to determine if the monster is chasing the victim. When the monster is within a certain range, I trigger a specific sound effect and some visual cues to indicate chasing.
However, I’ve run into a problem: the system is too sensitive. Even when the monster isn’t actively attacking or intending to harm the victim, it’s still flagged as chasing. This makes the experience annoying and unrealistic for players, as the chasing effects (sound and visuals) keep triggering unnecessarily.
What I want to achieve is a more accurate detection system where chasing is only recognized when the monster is actively trying to attack or harm the victim, not just based on proximity alone.
Has anyone dealt with a similar issue? How can I improve the logic to differentiate between mere proximity and actual chasing behavior? Any suggestions or examples would be greatly appreciated!
Thanks in advance!