Is it possible to enable Nav Modifiers on dynamically spawned blueprint actors?
Hi, I have a blueprint which has a Box collision component and a Nav Modifier component. The Nav Modifier area class has been set to NavArea_Obstacle. When I add an actor of this blueprint into the level from the editor, it works fine and the AI bots avoid moving through this actor unless the alternatives are too long.
But when this actor is spawned in at runtime using blueprints, the AI completely ignores it. I've confirmed it's placement by turning on the collision visibility and navigation display, and it clearly has no effect on the nav mesh unlike the one that's placed in the editor manually. Enabling runtime nav mesh generation doesn't seem to have any effect either. So is there something that I'm missing here? Or does the engine have no support for adding Nav Modifiers using blueprint at runtime?
asked Nov 24 '15 at 10:19 AM in Blueprint Scripting
Finally figured it out. For a collision box to act as a nav modifier, it seems that we have to turn on the 'Dynamic Obstacle' parameter under it's Navigation properties. Now it's working fine. :D
answered Dec 16 '15 at 05:49 PM
I had a similar problem getting the navmesh to rebuild at runtime. Ticking Force Rebuild on Load in the project navigation mesh settings fixed it for me.
answered Nov 24 '15 at 07:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here