VR Runner Procedural Level Components

This document describes the use and construction of these components. At the top I will give examples on how to place them and adjust settings and below that I will discuss their construction.

Placing the components

Vertical Wall Climb

You can adjust the height of the vertical wall climb by moving the top spline point up and down. You can also set the difficulty of the climb which will be adjusted to the players arm length.

Horizontal Wall Climb

You can pull the spline points left and right to adjust the length of the wall. There are a few options for the bars, a difficulty and a randomness factor which adjusts the horizontal position by a random amount. You can also use only the bars if you want to build different shaped walls.

Monkey Bars

The monkey bars follow the spline so you can add points and adjust their positions to your liking. The side beams go straight from point to point so you may need to add extra points on the curves. You can also turn off everything but the bars with the checkbox if you want them to fit into a different setup.

Scaffolding

The scaffolding can be placed down and then adjusted in height by grabbing the top spline point and dragging it up or down. You can also choose whether you want the boards on the top by clicking the toggle. Additionally you can select an actor to attach to the scaffold for easier placement and to keep them together for future adjustments.

Rope Climb

The rope climb is very simple, just select a climbable rope to attach it to the top and then use the spline to adjust the rope length. There are various options for the rope as well.

Rope Swing

When setting up the rope swing you can select two scaffolds and adjust them from the rope swing so it’s easier to position anything. You can add multiple rope swings in a row by dragging out the spline and adjust the distance between them in the settings.

Zipline

The zipline is separated into two parts a top and the bottom. You can attach the top to a scaffold or place it wherever you like then you can select the bottom to attach the zipline. Finally you can adjust the starting point of the zipline hold.

Component Construction

All the components use similar logic so I’m only going to cover one and from there it should be fairly straight forward to get an idea of how the others work.

The Vertical Wall Climb

Opening up the construction script you will see a set of functions that are used to set up the wall.

The first function is used to load in the player’s arm length and set up the distance between holds which will be used by the add climbable bars.

In the add climbable bars function there are two important sections. Setting up the loop and getting the positions along the spline. To set up the for loop we want to work out how many bars we want to add. So we take the spline length and divide it by the distance between the holds. (here we minus 1 because we don’t want a hold to appear at the bottom in the floor)

Next we take the index and multiply it by the distance between holds to get the distance along the spline that we want to add the mesh at. We then reverse the values so that the beams are added from the top of the spline. Finally we get the location at the distance along the spline and add a small offset before spawning the beam.

The next two functions add side beams and add backboards both follow the same structure. We work out how many beams to add based on their height (using a fixed number here and by just eyeballing what seemed about right).

Then inside the loop we add a spline mesh and attach it to the spline. To get the spline mesh set up right we need to put in it’s start and end points as well as tangents. Setting up the spline mesh can be a bit of a pain as there are a few settings that can effect it including the spline up direction and forward axis (both of which I’ve set in the add spline mesh node). The tangents can also effect the way the mesh stretches and looks so in this case I’ve manually set them so the beams are consistent but you could get the tangents at the spline distance.

Here is the add backboards function and as you can see it is broadly the same as the above function.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: