🧗Wall Run Vertical
1.4.5 (IN Process)
Overview
The Wall Run Vertical State allows the character to run on Walls like Prince of persia. Its State ID is 15.
Creating the Wall Run Vertical State
To create a new WallRun Vertical State. use the Plus [+] button on the States list

Or duplicate any of the already created Wall Run States Assets of any character you own and drag it to the States List.
Priority
The state should have a higher priority than Idle, Locomotion and Fall. but below Death, since the animal can be killed at any time. Set it above states that will not be interrupted when is active.

When the animal is in this state, all the Lower priorities states are ignored until the Exit conditions for this state are fulfilled.
Requirements
The state requires Vertical surfaces to be tagged as "WallRun" or match the Parameter Tag

The character requires to have the Rotator GameObject already set.
Activation
The State uses raycasting to find a front vertical surface to activate it.
Activations Conditions
A raycast will be cast forward from the character and the the wall needs to be tagged as "WallRun" (optional)
The wall needs to be set on the given layer
Input Sprint needs to be active (optional)
Automatic
When enabled, the state will activate if one of the wall rays touches any collider.
By Input
When Pressing the Input Value for WallRun; E.g. Jump Input
This will be connected automatically with the state if the state has the same value for its Input.


Using a Zone
A Zone can activate the state.

Using a Reaction
Animal Reactions can be used to activate the state. Check Reactions
Exit Conditions
Internally, the exit conditions will be executed to check if the State can exit.
In the case of Wall Run the conditions are:
State Duration time has elapsed:

There's no more wall to Run.

The Exit Input was pressed.
Animator
Wall Run Substate Machine
The Wall Run requires an Animation State that is in charge of the Wall Run movement.

Enter Transition

Animation States (Core Animations)
The animations required for the Wall Run are 2.. Run in the Left side and Run in the Right side

Right Transition Condition is
State Enter Status = 1
Left Transition Condition is
State Enter Status = 0
(Default Transition)

WallRun Parameters

Automatic
The state will use the Rays to activate the state as soon as it finds a wall.
Input Pressed
The State will keep its activation as long as the Input is pressed. If the Input is released the State will end.
Pivot Center
Position Value to Cast the Wall Rays
Wall Check
Length of the RayCast to find a front wall
Wall Distance
How far or close from the wall the character will be during the wall run.

Start Height
Height from the ground needed to activate the wall run. This is used so the character does not accidentally touch a Wall and activates the state, and right after deactivate it because is close to the ground.
Layer
Layer to check what colliders will be used for the State. By Default is set to "Default"
Wall Tag
GameObjects Tag to check what objects will be used for the State. By Default is set to "WallRun"
Align Lerp
Lerp Value to Position the character correctly on the Wall. Higher values it will snap the character to the wall
Rotation Lerp
Lerp Value to Orient the character correctly on the Wall. Higher values it will orient faster the character to the wall
Bank
Extra angle to orient the character to the wall.

Exit Angle
This will force the Character to Exit in an Angle when the State Exit. This allows to Give an angle
Exit Angle Time
Time to apply the Impulse/
Push States
If the next state is on this list. E.g. (Jump or Fall) the Exit Impulse and Angle will be applied.
This helps the character to separate from the wall (Jumping to another Wall)
Gravity Push
Value to drag the character Down when its on the wall Run. Set it to zero to to ignore gravity

Up Drag
Inherit Up Movement From the last state (E.g. Jump)

Last updated
Was this helpful?