Monday, 9 May 2016

FMP Week 17 - Technical Implementation - Ladder Blueprint

2/05/16 - 6/05/16

A working ladder seems like it should be pretty straightforward to make, though just because something seems straightforward doesn't mean it's always the case. After multiple tests and ages spent crawling through the UE4 forums, answer hub, and Reddit, the only tutorial that even comes close to working is the same one I used a good 1 and a half years ago (when UE4 was a very different place). This one: https://gamingbootcamp.files.wordpress.com/2015/09/ue4blueprintladdervolumetutorial.pdf

After some adaptation, here's the explanation of the final ladder Blueprint:

If the player enters the overlap volume, and they're holding down either W, the up key or moving the left thumbstick forward...


... then player movement is set to flying, the movement is constrained to the z axis, and max acceleration is increased to allow for faster climbing.


Else, if the player isn't holding down W, Up or moving the thumbstick forward, movement is set to walking, constraints are removed and gravity scale is increased to allow for faster falling.


This delay acts as a loop to check every 0.2 if the player is still overlapping:


When the player leaves the overlap volume, movement is set to walking, constraints are removed, gravity and acceleration values are set back to default.