Hi,
I have been losing my mind about this all day, so it would be great if someone knows how i can fix this.
I tried recreating this tutorial: Block Access To Area Of Level Until Player Reaches Requirements - Unreal Engine 4 Tutorial - YouTube , however for some reason when I destroy the actor, it still doesn’t let me access the blocked area. I have debugged the whole thing and I’m fairly certain that even tho I destroy the BlockingVolume, the collision stays.
I even tried to recreate it in a blueprint where I added 2 triggerboxes. When I would overlap with the first one it would destroy the other one. The second triggerbox I gave a certain collision type so that the navmesh would be blocked, and once I would overlap with the first box it would dissapear. I made the boxes visible so I could see them in game and it completely worked, except for that the area would still not be accessible. Why is this happening and how do I fix this?
If the navmesh is being blocked, and you’re using the navmesh for the player’s navigation, then you need to ensure that you’re rebuilding the navmesh at runtime. Otherwise, the blockage will be there even if the actor that caused it is gone or moved.
This tutorial will go over how to enable navmesh rebuilding at runtime:
1 Like
Create an Actor Class (BP_Barrier).
Add a Box collision component… This will be your blocking collision.
When requirements are met simply disable the collision on the Box collision component.
Destroying isn’t always the best approach.
Drag the actor in to your level. While selected scale the Collision as needed.
In your requirements class create a reference to the barrier.
When requirements are met: barrier reference → Disable Barrier
1 Like
Thank you! unfortunately it didn’t have the ‘rebuild at runtime’ option in unreal engine 5 anymore, but I just changed the runtime generation to dynamic and that worked!
No problem, if you could mark that post as the answer for others looking for the same questions, I’d appreciate it. 