How to add blocking volume to Character Blueprint?

Hi,

Have you tried using the box shape and setting it to blockalldynamic? this might work for a blueprints based blocking volume. You can also set the level blueprint to place blocking volumes, hide them, move them, etc. based on AI location.

How can I add Blocking Volume (it need to be blocking volume in order to have navmesh blocked as well) to Blueprint?

I’m creating turn based combat with couple of AIs. And I would like to:

  • When there is a turn for AI turn off blocking volume collision so NavMesh will generate and he will be able to move,

  • When he reached destination turn on blocking volume collision so others AIs will find a way near this character and won’t block.

I was able to create this functionality using Level Blueprint and attaching Blocking Volumes to characters - and it’s working.

When I put Box component to Blueprint navmesh don’t want to generate…and when i spawn blocking volume it doesn’t collide with navmesh.

Have you tried using the box shape and
setting it to blockalldynamic? this
might work for a blueprints based
blocking volume.

Tried - won’t work.

You can also set the level blueprint
to place blocking volumes, hide them,
move them, etc. based on AI location.

Yes but it would be MUCH MORE easier to do this in AICharacter blueprint. Just add Blocking Volume, and enable/disable it when needed. So you won’t need to have references in Level Blueprint and handle when should to turn them on and on which actor.

Is your NavMesh set to rebuild at runtime?

as always :wink:

Hi,

To rebuild the NavMesh after adding in blocking components, you can use the Execute Console Command node with the parameter “RebuildNavigation” to force the NavMesh to rebuild.

Hi vaughnva,

Yes I know but this isn’t the problem here…

Anyone from Epic can comment this?

Hi ,

Using what suggested, I was able to get a character with a box around that that I could switch the collision on to block/unblock the navmesh. I found that the one stipulation was that it had to be a separate actor in order to update the navmesh.

So what I did was I created an Actor Blueprint that was just a box that blocked Pawn collision (The NavMesh channel). Then in the Character, I added a Child Actor Component with the Box Actor BP as the class. By disabling/enabling the Child Actor Component’s collision, I was able to block and unblock the navmesh.

Let me know if that helps.

Thanks! Its working!