Hello,
I’ve been trying to solve a problem for several days now. I’ve created an AI for an enemy which for the context is a mobille turret. I’d like it to do everything possible to stay at a certain distance from the player. Currently the turret moves towards the player until it’s very close (until then I know how to solve this problem), but when the player approaches the turret it stays where it is and chases the player rather than staying at a certain distance from the player. If anyone can help, thank you very much!
(Here’s a diagram of the problem and the pieces of code that allow the ia to move towards the player ) :