The chase

Our next task is to make our enemy tank chase the player around. We will need two scripts. The first will simply advertise the player's current position. The second will use that position and the NavMeshAgent component that we set up earlier to find a path to the player.

Get Unity Android Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.