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 (40 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:
https://gamedevelopment.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732

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 (13,244 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.

https://github.com/godotengine/godot/pull/32557

answered Nov 6, 2019 by Asheraryam (88 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.