Splitting Pedestrian Flows by Volumes on NavMesh (New for v. 8.4)
When a static prop is placed on the NavMesh, it creates an avoidance volume that actors will try to circumvent. The barrier volume can also be used to a more dramatic effect, completely blocking the actors from passing through.
Given the following example of actors and the NavMesh split into two paths.
For Motion Director > Player Control and Auto in Zone modes, there is equal chance that the actors will choose either side to walk to the other side.
By using the avoidance and barrier volumes you can force the actors to pick a side.
- Select the 'NavMeshController' in the Scene Manager.
- In the Modify panel, click the Create Avoidance Volume button.
- A magenta bounding box will appear with the number '99'.
The 'NM_AvoidanceVol' node will be created under 'NavMeshController' in the Scene manager. - Transform the volume on top of one trail.
- Click on Modify > Avoidance Volume > Update.
The area on the NavMesh intersecting the volume will be highlighted with the Draw Color.Change Color and Volume Shape- You can adjust the Draw Color to change the display of the highlighted area.
- The volume can also be changed to a cylinder via the Shape drop-down menu.
- You can adjust the Draw Color to change the display of the highlighted area.
- Select the avoidance volume and set the Avoidance value to 10.
This value determines the likelihood of the actors choosing to pass through the avoidance volume. - Repeat the same steps for the other trail. However, the Avoidance value set to 20.
Because the left volume has lower value, the actors tend to move through it more than the other for the Motion Director > Player Control or Auto in Zone mode. - However, you can still deliberately set the destination into the volume to force the actors to move through it.
- If you forbid the actors to move through a specific part of the NavMesh, then select the NavMeshController in the Scene Manager and click the Create Barrier Volume button in the Modify panel.
- As you can see in the viewport, there will be a cyan frame box showing.
Also, you will find a sub-item, named NM_BarrierVol under the NavMeshController in the Scene Manager. - Transform the volume elsewhere on the NavMesh.
- Click the Update button under the Avoidance Volume section in the Modify panel.
The NavMesh will be split open with a forbidden place.Change Volume Shape- You are allowed to change the shape of the volume to cylinder via the drop-down list.
- This method is similar to trim the NavMesh with Static Props.
- You are allowed to change the shape of the volume to cylinder via the drop-down list.
- Start the Motion Director mode and you will see the actors will never move into this area. You can not alt + click to set the target inside this area either.