How to make an AI that avoids the player

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By javrocks

When the player gets close to AI it is essentially suppose to run and try to avoid the
player

How would i go about doing this ???

:bust_in_silhouette: Reply From: deaton64

Hi,

You could do the opposite of this: Chase a player

So when the player enters the area, you can work out the direction and move the opposite direction, or a direction that is away from the player.

You can work out the direct to the player, it tells you on the link I posted.
If you know the direction to the player, you know the direction away from the player.
Move that direction.

deaton64 | 2021-06-25 16:15