🧗Wall Run Vertical
1.4.5 (IN Process)
Last updated
1.4.5 (IN Process)
Last updated
The Wall Run Vertical State allows the character to run on Walls like Prince of persia. Its State ID is 15.
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.
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.
Multiple States can have the same priority. Wall Run and Jump can be activated and interrupt each other.
When the animal is in this state, all the Lower priorities states are ignored until the Exit conditions for this state are fulfilled.
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.
The State uses raycasting to find a front vertical surface to activate it.
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)
When enabled, the state will activate if one of the wall rays touches any collider.
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.
A Zone can activate the state.
Animal Reactions can be used to activate the state. Check Reactions
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.
The Wall Run requires an Animation State that is in charge of the Wall Run movement.
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)
Core animations must have the Stae Tag properly set
The state will use the Rays to activate the state as soon as it finds a wall.
The State will keep its activation as long as the Input is pressed. If the Input is released the State will end.
Position Value to Cast the Wall Rays
Length of the RayCast to find a front wall
How far or close from the wall the character will be during the wall run.
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 to check what colliders will be used for the State. By Default is set to "Default"
GameObjects Tag to check what objects will be used for the State. By Default is set to "WallRun"
Lerp Value to Position the character correctly on the Wall. Higher values it will snap the character to the wall
Lerp Value to Orient the character correctly on the Wall. Higher values it will orient faster the character to the wall
Extra angle to orient the character to the wall.
This will force the Character to Exit in an Angle when the State Exit. This allows to Give an angle
Time to apply the Impulse/
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)
Value to drag the character Down when its on the wall Run. Set it to zero to to ignore gravity
Inherit Up Movement From the last state (E.g. Jump)