AI following a spline
Hi, I would like to make my AI follow a spline while still using the navmesh and detour avoidance.
I came up with a solution that I didn't implement yet since I'm not sure if it's correct or if there's already a better one, so just for the sake of it I'm asking first before potentially throwing my work away :) Namely the solution consists of creating an invisible Actor that follows the spline and then setting that actor as a move target for my AI.
My main concern is if detour will still work correctly when the target is not far enough from the AI or what would happen if the target suddenly finds itself inside a dynamic collision while the real target (end of spline) is still reachable and unobstructed.
Thanks in advance.
asked Oct 20 '14 at 02:09 PM in C++ Programming
There's currently no out-of-the-box way to do what you describe. In general the solution you described would work, with caveats:
But give your solution a try none the less, you're bound to learn something! :D
The proper solution would be to implement custom
There are some far plans to do that on the
answered Oct 20 '14 at 09:38 PM
I am not 100% sure what you are trying to accomplish but maybe this will help:
This will have the AI basically look for whatever target you want him to follow. It will then pick a random point near that target and save that location into a BlackBoard Component. Then you can tell the pawn to simply move to that location. This is dynamic path finding. This is how enemy bots find and move to the player in the ShooterGame example. I tweaked the code to suite my needs, perhaps you could do the same.
answered Oct 20 '14 at 05:20 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here