Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

DAY 55

So I've started working on the ledge climbing  mechanic. I'll be honest I had no idea where to start, so I had to look up a tutorial to give me a head start. As soon as I found a tutorial that was close to my vision, I watched it and, in the first 2 minutes, a real mind-blow occurred. 

I learned that you could actually add trace channels to an object. This means that you can apply a tick box to an object to detect if the object itself has a certain collision property. In this context, it means that you can have a hundred cubes scaled as plain walls, but you can add a channel to the collision that is specific to ledge climbing and tick the channel on only one object. This results in one out of the hundred items is technically climb-able. 

The revelation also hit me that I approached wall running wrong. If you remember, I had an issue where the player character does wall running if an object is at a certain angle, but it would do some accidental wall running most of the time. The way I approached it was that I controlled the angle to be obnixiously precise and it worked, but still had rare and minor issues with accidental wall running. With this new nugget of wisdom, I can apply the same technique to wall running. The more you know...

Anyway, the implementation did not go smoothly: 

1) there was a wrong if statement in the blueprint, it was set to true instead of false when jumping to grab the wall. Glossed over that section multiple times when debugging, because I figured that the player must be jumping when grabbing the wall, but eventually caught it. The player is not grabbing the wall while jumping, it grabs the wall when falling. 

2) I placed three functions at the event tick: the ForwardVector LineTrace, the height vector LineTrace and grabbing the wall. This one was very quickly fixed by removing the Wall Grab function from the Event Tick. It caused the player to go in 0,0,0 position and grab... ugh, something...I have no idea what it grabbed....the ground???

3) This one was particularly tricky. At this point, everything should technically work, but the character did not grab the wall. I tinkered around, but got nothing, for about an hour or so. Got a very intense flashback of the Rope Swing debacle. But I figured it out: I had an InRange Float node that was bound to one of the character bones (pelvis), but the heigh of the pelvis did not match the InRange Float node values, which were less than the pelvis height. Doubled the minimum values detecting the pelvis in the InRange Float node (from -50 to -100) and now it worked as intended.

So that's it for today, I'll upload a video tomorrow. See you guys in the next post. Bye.