Escape By Any Means Devlog pt6


This code allows you to kill the AI.

This is done by detecting whether you are in a trigger collider which covers the surrounding area of the AI. 

If you are in the collider an array of colliders is created which use overlapsphere to detect all colliders that are found in the sphere. 

Then a foreach loop is used to detect if the collider found is an AI.

 If there is an AI in the sphere and the player presses left click they will kill the AI.

Get Escape By Any Means