You are browsing as a guest. Sign up (or log in) to start making projects!

13h 25m 24s logged

Mantling and fixes
Hi.
I have had a very long week. I spent a lot of time working on sprites, mostly for the game 3rd level (no spoilers, (but that’s pretty boring) so heres the interesting part. I’ve been focusing on revamping player movement to make it feel more interesting and fun, and this is a good start.

Mantling!
if you don’t know what this is, it’s what you do when you get out of a pool without a ladder or staircase, pretty much just “pulling yourself up” The player does this by using raycasts, I added three, but one is for something else. One of them detects a wall in front of the player, and one detects a wall above. The code uses these casts to detect if the player is up against a wall, and if there is no wall above the player, pretty much checking if there is a mantalable ledge. If there is, the code says “you can mantle”
Another line says: if you can mantle, and you are not on the ground, and if the player clicked space (Jump), then mantle.
The annoying part was animations. When the player begins mantling, the hitbox and player position is frozen in space, and position is snapped to the nearest block to line up the animation. the only thing that moves during the animation is the player sprite, which means at the end of the animation, when the players position is finally changed, the player sprite needs to snap back at the EXACT same time, or it looks bad, which was hard. The other annoying part was the camera snapping randomly, as it moves with the player and not the sprite. I fixed this by just temporarily turning on the cameras position smoothing while the mantle is happening and then turning it off when the player moves again.

0
23

Comments 1

@water

cool project twin!!! keep it going!