Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Agent getting stuck on sloped/higher corners

I've been having some trouble tweaking my navmeshes, as I'm having an agent get stuck in a funny way while pathing around with MoveToLocation. I want to keep the parameters of the navmesh as customizable as possible, i.e. allowing for large step heights and max slopes. The problem I'm seeing, however, is that when the agent hits a link in the path on a sloped corner, he steps up and over the location of the current immediate move destination (i.e. that path link destination), and so he jiggles around it for a while until he either steps close enough to the link or paths somewhere else.

I was wondering if there is a way to ignore the Z-height while the agent is pathing when reaching immediate move destinations, or something similar - such as an "Acceptance Radius" for the path links rather than just the goal location. I could fix this by making his max step height lower so he can't jiggle over (and too far away) from the next move destination, but that makes my navmesh too sparse for gameplay.

Image below to clarify:

alt text

Product Version: Not Selected
untitled-1.png (269.9 kB)
more ▼

asked Dec 02 '14 at 02:16 AM in Using UE4

avatar image

31 5 8 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Unfortunately the picture is more confusing than clarifying :D Is this what you intended to post? There's no navigation information on the image.

But I think I know what you mean. Currently the only way to relax Z-axis checks in pathfollowing is with C++. You need to derive a class from UPathFollowingComponent and set MinAgentHalfHeightPct to something more than 1. I'd start with 2 in your case.



more ▼

answered Dec 02 '14 at 03:38 PM

avatar image

MieszkoZ STAFF
7.3k 223 57 412

avatar image Ruffian Dec 02 '14 at 09:05 PM

Thanks for parsing through my mess of information, Mieszko. That was the answer I was looking for. :)

avatar image Ruffian Dec 03 '14 at 05:26 AM

Hmm.. I've been playing around with the MinAgentHalfHeightPct, and it's still not working properly for some reason. It seems I may have to work from UE4 source and debug into the HasReached function, eh? :(

EDIT: Now I'm just confused for all sorts of reasons. Now I'm noticing the collision capsule is getting stuck on corners with, as far as I know, correct nav mesh/system settings for my character. The red line in the image below is just a cast from the actor's position to the current move destination (since segment checks are done with the actor's feet, this debug visual is wrong, but it gets the point across).

alt text

untitled-1.png (517.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question