AI refuses to move if "vertically-close" to platform

Hi,

Summary of issue: An AI character can’t get to waypoints if another platform is vertically close to them.

Detail: I’m using Paper2D, and I can successfully get an AI to use “AI MoveTo” or “Move to Location” to get between two waypoints, one of which is on a platform above. So the AI walks to the waypoint on its current platform, then uses the Smart Link to get to the platform above and then walks to the 2nd waypoint. It will continously do this successfully in a loop. This image shows it successfully having made it to the top and about to use the smart nav link to go down again:

If I move the upper platform down closer to the lower one, but so that there’s still height enough (visually at least) for the AI to move around underneath and try the same thing, the AI fails to get to the waypoints and doesn’t use the Smart link. Like this:

It fails with either command like so:

AI MoveTo:
LogBlueprintUserMessages: [WaypointMovement] Aborted
LogBlueprintUserMessages: [WaypointMovement] Blocked

Move to Location:
LogBlueprintUserMessages: [WaypointMovement] Request Successful
LogBlueprintUserMessages: [WaypointMovement] Request Successful

The AI moves along to the first waypoint (which is on the same platform as it is), turns around, and then runs to the other end of the platform (ignoring the Smart nav link proxy on the way), and then sort of runs on the spot, then stops and reports “blocked” (if using AI MoveTo).

So I’m not sure what the problem is - I can’t see why it won’t work and I’ve tried all sorts of things such as shrinking the AI capsule right down until its tiny, but that doesn’t help it nav. It looks to me as if the AI thinks that maybe it’s actually on the same level as the platform above, but finds it can’t to the waypoints for some reason. Is there some kind of “range” at which this happens and if so how can i decrease it?

Here are my two movement nodes I’ve been switching between:

thanks for any help provided!

Sabre.

p.s. I keep getting logged out and sent to “CSRFAttackDetected” each time i try and post this with images so I’ll try and add them in a moment.

Tried to add Tag: “Mieszko please help!” but it didn’t allow me too :slight_smile:

Note: I have tried different Acceptance radii in both AI move commands, I’ve tried 100, 50, 20, 10, 5, 2, 1, 0 and -1.

Have you tried changing the settings in the Character Movement Component?

Specifically the settings under CharacterMovement: Nav Mesh Movement and Nav Movement could affect this stuff.

The setting that stuck out to me the most here was Nav Walking Search Height Scale.

No i hadn’t spotted all those! Thanks Ben, I shall give those and related ones a try.

UPDATE: No luck so far. I have also now tried using a different AI character which is about half the height, and it still stops working when i lower the top platform down. I’ve got an approximation of the gap; if the gap is about 145 units between platforms it works, at around 140 it stops working.

Anyone? Please…
The unfortunate truth is that this is a vital feature for my game design :frowning:

Bump. (Sorry).

Bump. Sorry.

Is there any detail I can provide that would help someone out there point me in the right or suspected direction?
Thanks

Hi, I never used NavLinkProxies, so I don’t know what is wrong there. If you’re using blueprints only, then you could try to create a new blueprint that inherits from “NavLinkProxy” and use that instead of the default one. Then print those nodes here (so make sure the Event Receive Smart Link Reached does fire correctly)

316633-annotation-2020-09-30.jpg

With c++, it seems to me that the relevant classes are the UPathFollowingComponent (which handles how the AI moves), the ANavLinkProxy (that’s the thing you place there) and maybe the UNavLinkCustomComponent to make sure you have correct start and end locations. So with c++ you could inherit from all those and then use them instead of the default ones and then add debug messages until you find what is going on there.

Hi chrudimer, thanks for the response.

I am using Blueprints.

I’m already using a Blueprint I created that inherits from NavLinkProxy, and it does work (if the platforms are far enough apart). I do get the Event Receive Smart Link Reached functioning correctly. (I have a print string that reports this).
So it works 100% of the time IF the two platforms are ANY distance apart (> 145 ish)… The AI runs to a waypoint, then runs to the SmartNavLink, I currently teleport them to the other platform and they continue moving to the other waypoint. They then do this in a loop.

Of course I have to adjust the position of the navlinks each time I change one of the platform heights.

The problem is if i bring the two platforms closer together, i.e. lower the top one down a bit so it’s closer to the bottom one, anything less than about 140 units apart, and the AI no longer uses the SmartLink, it runs to the end of the current platform and sort of runs on the spot before stopping and failing.