x

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"

RecastNavMesh get NavMeshEdges in Box

Hi,

I am trying to get a NavMeshEdges in Box extents from RecastNavMesh, So far I found how to get NavPolys Array from the NavMesh (`NavMesh->GetPolysInBox(...)`) But I am struggling to understand how would I extract them from the NavPoly.

What are NavPolys and what are NavTiles - how would I get a NavMeshEdges ?

P.S. (Don't link Rama's tutorial it doesn't cover that up).

Product Version: UE 4.16
Tags:
more ▼

asked Dec 17 '17 at 11:57 PM in C++ Programming

avatar image

ColdSteel48
457 6 13 19

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I can suggest looking at FNavMeshSceneProxyData::GatherData which in turn calls FPImplRecastNavMesh::GetDebugGeometry which essentially translates recast's navigation graph into polygons and edges. This should give you some idea how that data is stored in Recast an may be even enough for your use case (and definitely good enough for a POC).

Cheers

--mieszko

more ▼

answered Dec 18 '17 at 09:31 AM

avatar image

MieszkoZ STAFF
7.2k 223 56 406

avatar image ColdSteel48 Dec 18 '17 at 12:47 PM

Dziękuję Mieszko!

Interestingly enough I tired to do exactly the same yesterday to access the debug array, but it always returned an empty array so I left it be and tried another way - after your answer I realized that I had to set the FRecastDebugGeometry::bGatherNavMeshEdges to true...

As far as I understand the Edges amount must be an Even number - because a wall represented by 2 Edges ? (And there is no Edge share -> since it is an FVectors array). So to get a wall segment would be NavMeshEdges[i] NavMeshEdges[i+1] i+=2 ?

Or do I miss something ?

Thank you very much !!!!!!!!!

avatar image ColdSteel48 Dec 19 '17 at 12:26 AM

I managed to get a POC - Video

The agents seems to stop to enter inside the objects -> which is good :) However the RVO quality is below desired level :(.

Should I try to Integrate RVO2 instead of the built in ? Or the result will be roughly the same and does not worth the time wasted ?

avatar image ColdSteel48 Dec 25 '17 at 01:53 PM

And to answer my own question: Implementing RVO2 was just a waste of time - at some cases it works better at some worse at some same :-(...

(comments are locked)
10|2000 characters needed characters left
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