Download

Issue With AIPerception Component

After countless amount of nights to get my AI up and running , having a behaviour based on Sight , Hearing , Damage , Touch all working.
im running into a “little” but giant issue.
The AI works as intended, Patrolling , Idling , Searching , and Hostile Behaviour , the only issue i have is that.
When the AI dies "i have an event that when the AI Dies goes to ragdoll , and i detach from controller and pending destroy.
The AI Keeps Updating the perception , when i kill for example 6 7 AI’s and they start updating perceptions the FPS drop is massive and leads to severe performance downgrade.
i tried to Deactivate / Destroy , basically i tried everything that came up in my mind to try and stop Updating the AIperception component when the AI is dead but no result so far.
i also have a branch right at the start of OnTargetPerceptionUpdate(AIPerception) with bool “isDead” if false then it can proceed with the function but looks like the AIPerception component does not care. does anyone have ANY idea on how i can disable the perception component when the AI is dead ? i dont want to destroy the actor “thats the only thing that fixes it” because i want players to be able to Handle / Play with ragdolls.
Any help would be appreciated.