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"

[4.6.1] - Navmesh not generating over instanced static meshes

I have a custom actor in my level which is spawning static mesh instances representing the geometry of my level at runtime. I have created a NavMeshBoundsVolume and set it's extents to cover the entire area I could possibly generate geometry in. My project settings has rebuild navigation at runtime checked, as does the rebuild at runtime setting in my level's recastnavmesh instance.

This is what I end up with - alt text

Which is not what I want... I want all the static meshes to be covered by the nav mesh. Is this intended behavior or do I need to tweak some setting on the navmesh / project somewhere?

Thanks,

-Zach

Edit : Someone in IRC suggested I take a look at the collision settings of my meshes, so I removed all collision meshes from the meshes I am referencing in my instanced static mesh components, and replaced them with simple box collision meshes. I checked the collision settings on the instanced static mesh components themselves and everything seems to be good, but still not working :/

Product Version: Not Selected
Tags:
more ▼

asked Feb 16 '15 at 06:15 PM in Bug Reports

avatar image

Zachary Carter
76 4 9 130

avatar image Zachary Carter Feb 16 '15 at 08:30 PM

Okay it seems that after all my meshes are generated, if I change the collision object type of one of my instance static mesh components, the navmesh regenerates correctly. If I do this in code however, it doesn't seem to work. Still need help on this. Also it doesn't matter what I change the collision object type to - both world static and world dynamic work and cause the nav mesh to update properly.

avatar image TJ V ♦♦ STAFF Feb 16 '15 at 09:19 PM

Hi Zachary,

Which version of the editor are you seeing this in? Could you get this to repro in a new test project and upload it here?

avatar image Zachary Carter Feb 16 '15 at 10:34 PM

Hi TJ, I'm currently checking out a fresh copy of the engine to do some investigation to see if some code is being called when I set that variable in the editor vs when I do it inside my actor. If I can't figure it out / switching to the git hash version of the engine doesn't fix it for me I will upload and link.

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

1 answer: sort voted first

Hi TJ,

I was able to get the recast nav mesh to regenerate correctly by calling AActor::ReregisterAllComponents() on the custom actor which holds reference to my instanced static mesh components. I noticed that when I changed a property in the editor, this function was being called, so I called it myself and navigation seems to have righted itself.

I doubt this is the ideal way of addressing the problem, but until it presents a problem I'll accept it as a solution.

more ▼

answered Feb 17 '15 at 03:01 PM

avatar image

Zachary Carter
76 4 9 130

avatar image xenlock Jun 25 '15 at 11:44 PM

Thank you for this! Also, sorry for necroing; I came across this problem today in 4.8 and wanted to add that calling AActor::UpdateComponentTransforms() is sufficient to fix this. ReregisterAllComponents() is significantly more expensive and if you have lots of dynamically spawning instanced meshes, only updating transforms should be much more performant!

avatar image MostFunGuy Jul 21 '17 at 01:43 AM

Necro-ing again, is there a blueprint equivalent for "AActor::UpdateComponentTransforms()"?

I've got all instanced static meshes, and my navigation does not want to play well with them currently.

avatar image soulsource_ag Dec 21 '17 at 11:30 AM

Necro #3: I tried to debug this issue in 4.17.2 (yes, it's still there...). The code in HierarchicalInstancedStaticMesh.cpp:2700 seems to be correct to me, but for whatever reason the return value of FBoxSphereBounds::GetBox() (which is being called there) seems to be an invalid box, what should be impossible as far as I understand the code... I haven't tried this in a debug build of the engine yet, but I wouldn't even be surprised if it turned out to be a bug in the compiler used to make the engine build...

(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