[Question] Navmesh. Dynamic obstacles and skeletal actor walkable

  1. I have static actor extended from AActor which has skeletal mesh. And blueprint of this actor placed on map is unwalkable, i mean no navmesh generated above this object on map.
    I did not found any function or property how to set|or remove this object to be walkable, like it was in UDK.
    Is there any such like property? Maybe some boolean property, or other properties should be spicifically set somewhere?

  2. Also i did not found any navmesh obstacle creation function. Is it somewhere, and if it is, then which class i can find it? I need that to set static actor extended from AActor which has skeletal mesh to be walkable or non-walkable at runtime. But maybe i can achive this with some walkable property if navmesh recalculates when it changes.

tnx

Hi Ilya,

Thank you for your questions. Based on what you are describing about an obstacle, it sounds like you need to create a Nav Modifier Volume and set its default AreaClass as NavArea_Null. This will negate any NavMesh path created by the NavMesh Bounds Volume. You can also go to your Edit > Project Settings > Navigation Mesh and turn on “Rebuild at Runtime” to rebuild your paths during the game.

I am not sure if I completely understand what you are trying to describe in your first question, but NavMesh does not generate on skeletal meshes currently. Could you provide me with more details?

Cheers,

Alexander

Hi!
The best thing would be if i will be able to set some areas with mine bounds to be walkable or not during runtime.
For example - strategy game. Player can place building on land, and then this land with bounds of placed building should be unwalkable. Navmesh obstacles in UDK was good for it, but was very slow.

Also, i have an actor extended from AActor which has skeletal mesh - it is a simple box, but box is not a regular static mesh. This box can play anim, it can be opened, but when box is closed then characters should walk on this box. When player open this box, then this box should be unwalkable, so i need use box bounds to set area where this box located to be unwalkable.
But as i experimented above and Alexander Paschall replied “NavMesh does not generate on skeletal meshes currently.”

Tnx.

In the scenario you have described, I would suggest using Blocking Volumes. Blocking Volumes will block a NavMesh, but it will also allow a NavMesh to be built on top of it. You could have a Blocking Volume that moves up to block player movement when open, then down when the box is closed. When it is close enough to the ground NavMesh, it will blend them together. You will need the “Rebuild at Runtime” on in order to do this also. Please let me know if that has helped.

Cheers!

Alexander

Hi!
All weekend i wasted time to get any solution on my needs. And, i did nothing.
I want to share my research and request feature adding.

Nav Modifier Volume
I did not found a way how to create it or spawn it during runtime. Example would be great. Also as i understand right, Nav Modifier Volume can only block path construction in place where it located. I tried to locate NavArea_Null and NavArea_Default above my skeletal mesh, and in both times i had no navmesh was built above skeletal mesh.

Blocking Volumes
Blocking Volumes block traces to actor behind it. Also, i tried to create it during play, but i did not get it to work, i do not know how to do it in c++ during runtime. Example would be great.

Volume it is not component and can not be used as component, so i need to create it at runtime, get pointer, then set size, set relative location, and move up or down when needed. I hope it can be sized and moved.

Box component.
The best way as i can see - it is to use box component. It can be created in constructor, and then all properties can be set in blueprint. I can set extent of box there, after i can get scaled extent in c++, i can set relative location, and move it around root component.
BUT! It does nothing with collision! And interesting why? Maybe it is a bug.

/** 
 * A box generally used for simple collision. Bounds are rendered as lines in the editor.
 */
class UBoxComponent : public UShapeComponent

So, in blueprint i have skeletal mesh component with no collision, and box component with collision preset “Block all”. Navmesh is not generated above this object placed in map, but this object can be get with trace. I do not understand why navmesh was not built above this object.
Look at screenshot:

Staticmesh component
Also, instead of box component i have tried to use static mesh component. So my blueprint had skeletal mesh and static mesh. Skeletal mesh without collision, and static mesh with collision “Block all”. Static mesh - i have used “Shape_Cube” from engine assets. And i have 2 different results with it.

SM.1 If i create staticmesh component in constructor:

MeshBox = PCIP.CreateDefaultSubobject(this, TEXT("MeshBox"));

Then in blueprint in components sheet i set staticmesh to “Shape_Cube” and set bounds, then i do not see staticmesh and i see only fringe lines of staticmesh. Navmesh above this object on map was not generated, and during runtime it works like there is no collision.
Also, looks like here is same thing i had in other thread:
https://rocket.unrealengine.com/questions/14442/making-own-actor-like-playerstart-how-to-add-sprit.html
There, when i tried to add sprite component in c++ constructor, then i did not see sprite texture in blueprint. But if i tried to add sprite component in blueprint component sheet then i see sprite texture in blueprint.

SM.2 If i do not create staticmesh component in constructor, and i am adding it in
components sheet of blueprint, then if i set staticmesh to “Shape_Cube” then is see mesh with material in blueprint and in object placed on map. Also in that time navmesh is generated above that object, but i have no pointer of staticmesh in code, to move it. Also, it is strange, why static mesh creation in two different times get such a different result with view and collision. I think it should be same. It means i did something wrong when i created staticmesh component in c++.

For now i still did not get any workable solution.

It would be great if Epic games can make skeletal mesh to be walkable by characters, because some of skeletal meshes can be just static actors with animations.
Also, It would be great to get a way to set some areas to be non walkable during runtime, like in UE3 it was done with dynamic obstacles (or just maybe give an example of how to spawn Nav Modifier Volume during runtime to make it acts like obstacle)

Tnx

Hi Ilya,

Thank you for your patience as I was attempting to find a work-around for the issue. I was able to find that we currently do not have support for skeletalmeshes being seen by navmesh generation. I have entered a feature request into our database and referenced the problems that you have encountered. This would be a great function with a lot of uses.

Cheers!

Alexander

Oh, cool, tnx, it is a very good news, i will waiting for this feature be completed

I hope you do navmesh can be generated over skeletal meshes and some dynamic navmesh obstacle class like in UE3

any news on this feature request?

Hi Intoxica3,

Can you post this as a new question on the AnswerHub? This is a post from our archived beta of UE4 that is no longer being tracked.

Thank you!

Tim