Demo PAINTING STAIRCASE Perspective (Multilevel)

To show how to create staircase we will use the PAINTING demo. Let’s load the scene.

If you are using a recent version of Unity that no longer supports Navigation (Obsolete). the NavMeshSurface component will be added to the VBAreaTK GameObject, child of VB25dTK.

To prevent the navmesh frame from appearing, open the Gizmos drop-down menu and deselect NavMeshSurface.

Now zoom in to count the steps in the image.

There are more or less seven. Keep in mind that if the steps are very low and you use Unity Navigation, you may have to work a bit on the parameters to get the baking right.

Move to the Staircase tab within the Navigation tab and double-click on the edge of the sloping area from which you want to generate the steps.

Enter the number of steps you want in the Number of steps field, in our case seven, then click Convert.

If you want to remove the steps and restore the sloping area, select the staircase and click Remove staircase.

Let’s move on to the other areas.

There are six steps, but when you try to convert the area, if you are using the PAINTING demo, you will get an error warning.

This happens because during the creation of the scene some vertices were moved by selecting the sloping area rather than the flat areas. This isn’t really a mistake if you don’t intend to create staircase in your scene. But if you want to build staircases instead, the script expects two requirements:

  • There must be four vertices of the sloping area.
  • Each pair of vertices must be on the same level.

However, it is advisable never to move the vertices of the sloping areas but rather the related connected vertices of the flat areas.

To get around the problem, simply move the four vertices, one by one, selecting the corresponding flat areas. Move it and then put it back in place. This way the vertex will return to the right level.

We have moved and rearranged the four vertices, now the staircase will be created.

We select the two remaining sloping areas and assign seven steps to the one on the left and six steps to the one on the right.

We can create the mesh by dragging VBAreaTK, child of VB25dTK, into the Area field in the Mesh tab.

Now we need to play a bit with the Radius, Height, Step Height values of Unity Navigation and decide whether to enable the Build Height Mesh option which, if you use a recent version of Unity, you will find in the NavMeshSurface component attached to VBAreaTK.

See the PAINTING STAIRCASE demo for some possible combinations.

Author: vbgamestudio

One Reply to “Demo PAINTING STAIRCASE Perspective (Multilevel)”

Comments are closed.