In character viewport, reduce capulse size to 92*32
In character BP,
make cusotme event attachwall
collapse as marco, called Wall Trace
Open the marco and connect input/output,
add extra input called Offset, connect to an new added + node
Back to event graph
Add keyboard key to climb In character movement, set flying as
Import relevant climbing animations
Create blend space below, called BS_Climbing:
Open the Anim BP
Anim Graph
Create 3 variables:
Make the graph:
(R click on Blend poses to add walking pose and flying pose)
Back to character BP, movement input
For up and down input axis , add new function
WallClimbMovement
Continue after branch (Target set as local variable from location of break hit result):
Add in the function in event graph:
To Stop Climbing:
In character BP event graph:
collaspe to function for above highlight nodes: DetachFromWall
Now if the player climb angled wall, will not stand upright after stop climbing.
To fix it, add a custom event Reset Rotation in character BP:
Timeline set length 0.5, 2 keyframe (create by R click), 0,0 and 0.5,1. key interpolation as auto
In Detach from Wall funciton, add:
Set max/min climb angle:
Add variables in Detach from Wall function
Set max default value 45, min value -75
Go to Wall Cimb Movement function
after Wall Trace marco, add an extra brunches and follow:
Allow Jump during climbing, then attach back the wall until no wall available:
In character BP, Jump command
(Apex is to fire off the event whenever reach the tallest point in the jump)
Use event begin play with Check for apex variable:
Set if jump and don’t detect the wall at apex, then back to normal walk:
In attach wall event, false branch, add detach from wall function:
In Input action jump, add jump up wall funciton
Clean up the ability to move around corners:
In Wall Climb Movement function:
The false branch after Line Trace by Channel, create another line trace:
Continue after line trace
(Max trun angle default value as 65)
Connect between wall trace and set target nodes:
Now it’s set that can pass wall corner beyond 65 degree but less than 90
To Value up surface when reaching the top:
In Wall Climb Movement, false branch after 2nd line trace and Wall Trace Marco:
To event graph, add custom event Vault up:
Back to wall climb movement, add highlighted:
Back to event graph, Vault up node: