Move to Position fluently AI

My goal is to make an AI Patrol around an big cylinder and when he spots the player he chases after him. The player chaseing part works already and the patroling also works but the AI doesn´t move really fluently.

The problem is that in the BT I search for a new point and then I´m using MoveTo. But when i spot my player the AI continues moving until it reached it previous point before start chasing the player. Same goes for the patrolling, the AI walks from point to point but the AI always moves in straight lines and not a real cirlce. (Using a spline and adding a certain distance every time and calculate new Point on Spline)

FindLocationOnSpline - saves new Location in Vector Variable MoveLocation

PlayerSpotted Variable will be set with AIPerception

Is there a better function than MoveTo? Something that mabye runs in the background and always moves to my MoveLocation Vector and when I change it, it also goes instantly to the new Position and cancles the old moveTo task?

It’s perfect that you create your own BT, I hope more people to do the same. But I see you’ve missed default and pretty simple Epic’s guide. In your case I’d use low time service to find the next location and watch for the player. This will allow you to walk more smoothly, update PlayerSpotted more frequently and stop patrolling instantly.

The playerSpotted variable gets updated whenever something moves into the sight field of the AI.

I fixed the problem with chasing the player instantly but the problem with walking to the player still remains because I save the player position and use moveTo to get to him. If the player moves in that time the AI still moves to the old point. If i cancle moveTo the AI stop for a moment, which looks dumb. A moveTo which runs in the background would be nice.

Yes I checked it, if I add a service which updates every 0.5 seconds but the moveTo in the BT is still in process does it get canceled?

You have a problem with calculating frequency. How do you handle this? And have you already check that guide?

Sure, your decorator should close the sequence immediately and other sequence will execute.