Today I plan to fix the jump detection system and adding an indicator to the player to display when the player has been damaged.
To allow the player to chain together consecutive jumps, I created a system that sends a line trace from the base of the player that detects the ground. If the ground is detected by this line trace the player is able to jump. This system work perfectly on the flat ground, however, when the player wanted to jump on rough or sloped surfaces the line trace was unable to reach the ground due to Belly’s round body. To solve this issue I replaced line trace with a sphere trace that changes size depending on the size of Belly.
One of the problems with the damage system at the moment was that there is no indicator of when the player is receiving damage apart from the knockback. To allow the player to see when damage has been inflicted I created an effect that would make the player flash white when they have received damage. This effect is created by a timeline that changes the value on the emissive and colour parameter of Belly’s mesh material.
When creating the flash effect I originally set the effect so that it took 0.3 seconds to complete which we agreed felt too long for the effect as if the player got attacked in rapid succession they would not be able to display individual flashes. I decided to reduce the speed in which the hit flash lasted so that the player would return to the normal colour quicker.
While the slam ability can be used to break through destructible platforms it’s secondary use is to apply damage to enemies so that they can be absorbed quicker as they have less health. To add more impact to the slam ability I decided to add knockback to the ability so that enemies will be knocked back on impact with the slam radius. Something that needs to be changed with this ability is that the slam radius scales to the size of Belly which makes slamming some of the enemies difficult as the radius is too small when at a small size.
Rees, O (2019). Using sphere traces to detect the ground instead of line traces. [offline]. [Accessed 25/03/2019].
Rees, O (2019). Detecting the ground using sphere traces blueprint. [offline]. [Accessed 25/03/2019].
Rees, O (2019). The player flashes white when damage has been inflicted. [offline]. [Accessed 25/03/2019].
Rees, O (2019). Receive damage flash blueprint. [offline]. [Accessed 25/03/2019].
Rees, O (2019). Normal damage flash. [offline]. [Accessed 25/03/2019].
Rees, O (2019). Quicker damage flash. [offline]. [Accessed 25/03/2019].
Rees, O (2019). Using the slam ability to apply damage and knockback to the enemies. [offline]. [Accessed 25/03/2019].