Unity project: Adding Enemy Attack

3 months ago
123

To make an enemy avoid obstacles, you can use raycasting and steering behaviors. First, figure out where the enemy is moving by looking at where the player is and normalizing the difference between the enemy's position and the player's. Next, cast some rays in front of the enemy to detect obstacles.

Loading comments...