My game has around 150 instances of an AI at a given time.
The AI are very simple and roam around randomly and attack their target when it comes close.
I don’t want to store the player character in a variable and detect if the player is near the AI through a decorator.
Instead I could use a cylinder like shape and detect the player through on-overlap delegates to detect when the player is in range. I assume the AI perception component does exactly the same. But as I AI is relatively simple, I didn’t want to use the AI perception component.
So I wanted to know which of the 3 will be more efficient to work with.
- Checked the distance between AI and player through a service.
- Using overlap through the overlap of a shape.
- Using AI perception component.