itch.io is community of indie game creators and players

Devlogs

Escape By Any Means Devlog pt6

Escape By Any Means
A downloadable game

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.

Download Escape By Any Means