0 votes

Please help, i have been trying to do this in the past 3 days and failed miserably in the process.

in Engine by (39 points)

1 Answer

+2 votes
Best answer

One common approach to entity movement is by using "steering behaviors". These are techniques that can be used to generate a wide variety of movement and behavior, from simple ones like "chase" and "flee" to more complex ones like "flocking" and "formation".

Below is a link to a series of good tutorials on implementing these. The one you'd like to use is called "flee".

https://gamedevelopment.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732

by (21,718 points)
selected by

Thank you helped me a lot

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.