During the playtest at the Games Hub (more information at the playtest can be found here), the majority of the feedback was about not having control over Belly’s movement and that was due to the player not being able to jump when Belly was bouncing.
To allow players to override the bounce but also the retain the bounciness of Belly’s movement I had to create a system that would allow Belly to perform a jump as soon as Belly makes contact with the ground.
My first attempt involved launching Belly on impact with the ground while the jump button is pressed. While this method worked it didn’t take into account jump hold time which allows the player to jump at different heights depending on how long the jump button has been held down. I had to find a different way of achieving the jump.
When looking at for a solution I discovered that there’s a variable within the character blueprint that allows the character to perform multiple jumps without touching the ground. Using this knowledge I created a line trace coming from the bottom of the of the player. If the line trace coming from the player is block, meaning the player is on/near the ground, the amount of jumps on the player is increased. If the player is not touching the ground the amount of jumps is set to to 1 so that the player can’t double jump in the air. This sequence is connected to the sound effect for the landing so that Belly sounds like it’s hitting the ground.
Rees, O (2019). Belly chaining together multiple jumps, overriding the bounce. [offline]. [Accessed 11/03/2019].
Rees, O (2019). Initial attempt at overriding the bounce by launching the player. [offline]. [Accessed 11/03/2019].
Rees, O (2019). Final jump override system using line traces. [offline]. [Accessed 11/03/2019].