Hi, I’m building a simple move to character AI (in AI character BP, not BB) and am having trouble getting anything other than success as a result.
My setup is :
- Navmesh covers the navigable area of player and AI
- Actors are on platforms separated by a gap that is not navigable by AI (no nav links)
What happens is: the AI runs to the edge of his platform closest to the player and stops and the MoveTo reports Success. Is there some way to get if the AI has failed in this way?
Thanks, so what if I don’t want the AI to be able to get to the player, yet still want to know that he can’t get to the player because of an obstacle (such as a gap, or maybe a blocking mesh)?
I’m assuming you’re using the players position for the target move to location. So, The simplest approach is to store the players location. On success compare the AI’s current location against the stored location… distance to … is within n radius, then a simple trace (chest to chest) to check for blocking object (thin wall/object etc.).
Basically is the end location with in say 100cm (1m) of target location. If so line/sphere trace from AI Spine 2 socket location to Player spine 2 socket location. If hit is player (Success), else Fail.
You would think it would say anything but success. If you drag off the movement results it has blocked, so you would think that would be the result, not success, because success would be the AI reaching the target.