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.

asked Nov 5, 2019 in Engine by KramchayDig (51 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.

answered Nov 6, 2019 by kidscancode (17,668 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.


answered Nov 6, 2019 by Asheraryam (90 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 How to use this Q&A? before posting your first questions.