Simple AI Obstacle Avoidance in Unity

Published: 01 July 2024
on channel: Ketra Games
5,252
140

In this Unity tutorial, we'll explore how to add some simple obstacle resolution logic to enemies, so they don’t get stuck walking into each other.

We’ll also look at how the same logic can be used to have the enemies navigate around obstacles.

To do this we'll make use of Unity's Physics2D.CircleCast method to detect obstacles and then take action to avoid them

This is the twentieth video in our series showing how to make a full top down 2D shooter game in Unity.

The playlist for this series can be found here
►    • Unity 2D Top Down Shooter for Beginners  

The project files are available to our patrons here:
►   / 107228431  

Want to follow along? This project is a good starting point
►   / 104708841  

The full Top Down Shooter Project is available to our patrons here
►   / 75231350  

The final scripts can be found here
► https://dotnetfiddle.net/hSzQHd

Help support our work:
► Patreon:   / ketragames  

Follow us:
► Ketra Games: http://www.ketra-games.com
► Patreon:   / ketragames  
► Twitter:   / ketragames  
► Facebook:   / ketragames  

Introduction - 0:00
Demonstrating the Problem - 00:31
Explaining Unity's Physics2D.CircleCast - 01:54
Implementing the Basic Obstacle Avoidance - 02:42
Improving the Obstacle Avoidance - 09:14
Testing Wall Avoidance - 14:19
Testing the Obstacle Avoidance in the Game - 15:54
Preview of the Next Unity Tutorial - 16:34

#KetraGames #LearnUnity #UnityTutorials #UnityTips


Watch video Simple AI Obstacle Avoidance in Unity online, duration hours minute second in high quality that is uploaded to the channel Ketra Games 01 July 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 5,252 times and liked it 140 visitors.