🧗Wall Run
1.4.2b
Last updated
1.4.2b
Last updated
The Wall Run State allows the character to run on Vertical surfaces. Its State ID is 12.
To create a new WallRun 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 math the Parameter Tag
The Animal Requires to have the Rotator GameObject already set.
The State uses raycasting to find nearby vertical surfaces tagged as "WallRun". If any of the raycasts touches any colliders (left or right) then the state can be successfully activated.
When enabled, if one of the wall rays touches any collider, the state will activate.
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 character is grounded or it has touched the ground
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 Wall RayCasts
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)