0 votes

It would be great if there is someone who have a project sample (2D or 3D) of a pathfinding AI that doesn't clamp together when it gets near to the target.

in Engine by (87 points)

what do you mean by clamping?

2 Answers

+1 vote

What you want falls under the category of "steering behaviors", a general term for coding realistic behavior on autonomous agents.

There's a really good overview of various applications here:

The examples aren't for Godot, but they are well-explained and should be relatively easy to implement in GDScript.

by (21,971 points)

It would be nice to have a tutorial on that, as it is really useful. My way of coupling with that was using area2D, and whenever another object crosses it, it will push both objects in opposite ways.

0 votes

There is PR in progress that adds collision avoidance, once it is merged there will be official support for this behaviour.


by (96 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.