Intro to Steering Behaviors in Godot

Steering behaviors allow you to code smooth AI movement using simple vector math. Learn what steering behaviors are and how to use them in this 4-part series!

Note that this series was made for Godot 3. The concepts and math behind steering behaviors are the same in Godot 4, but some of the API and syntax will differ.

Nathan

Founder and teacher at GDQuest

Follower AI

Let's code an AI that follows any point in space. You can use it to follow the mouse cursor, or another character, as we'll see later in the series.

Smooth arrive AI

Our AI can follow a point, but it will always arrive at it abruptly and try to keep moving to the target, even if it's already close to it. The arrive behavior makes agents smoothly arrive at a given location.

Moving smoothly towards the mouse

Let's put the steering behaviors we wrote to the test by making our AI move smoothly towards the mouse cursor.

Make the AI follow the leader

Make the AI agent follow another agent from a distance using the arrive to steering behavior.

download files

updates / code patches

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!

Site in BETA!found a bug?