I have a static mesh in my actor. It is possible to set “Can ever affect navigation” in the details tab. But I can`t find the way to do this in blueprint. Actually, there is a node “Set Can Affect Navigation Generation”, but it is only for pawns. Is there a way to set this property for static meshes in blueprint?
anyone???
I think it is impossible to change that in run time because navmesh need to be built and acts like the lightmass of static lights :))
Well with dynamic navigation enabled it should check for this kind of thing? Imagine I have 100+ static meshes that I want to randomly generate at run time so their locations are different every time you play. Imagine that one of these items is a park bench for example with physics enabled. You can push this park bench to a doorway to block it and the AI is stupid and just stands there so the player can cheat and shoot the AI cuz it wont go through the doorway since the nav is blocked…
However if the AI DID just walk through it it would simply knock the blocking item out of the way.
Currently I have to manually set EACH static mesh and then uncheck affects navigation in the level editor. Pretty tedious.
so. set all those static meshes not to effect navigation.
then set any of those static meshes which you want them to act like an obstacle not to simulate physics (possible in run time) so AI cannot push obstacles
it means that AIs can push an obstacle which is simulating physics but cannot push obstacles which are not simulating physics regardless of whether those obstacles can effect navigation or not
I think you misunderstand.
If I place an obstacle and its simulating physics and it DOESNT affect navigation. The AI will walk through it… which is what I WANT as they’ll simply kick the object out of the way. However if I cant set affects navigation, then they will simply not even attempt to walk up to it at all since it breaks the nav mesh.
So I have to MANUALLY set each traash can, each park bench etc and uncheck affects navigation. Meaning I can’t automate that kinda stuff, nor can I randomize it at run time since I can’t spawn static meshes and set them to not affect nav when spawned.
yes you are right.I misunderstood.
I can’t spawn static meshes and set them not to effect navigation too :))
sorry I don’t have any idea about that. :((
I hope somebody helps us to figure it out
i’m six years too late, but the best approach for this is to make a base actor called like, “NavigableMeshActor” off of actor, add a staticmeshcomponent to it, and then set that value in there.
now just place those and set the mesh in the meshcomponent and it’s all set up with that value already.
I encountered a similar issue, and I want to achieve a scenario where a grid body does not contribute to navigation generation when clicked through mouse ray tracing. If anyone sees this reply, please use C++ code to obtain a reference to the grid body component and utilize the SetCanEverAffectNavigation function.
我遇到了一个相同的问题,我想实现网格体在可以通过鼠标ray trace点击的情况下不参与导航生成,如果有人看到这个回复,那么请使用C++代码得到网格体组件的引用,并使用SetCanEverAffectNavigation函数.
set nav gen in project setting to runtime set mesh can ever affect navigation to true then set collision profile to NoCollision if you want to affect the navigation set it to BlockAll