Personal Development Project - Blog Entry 2
- Martyn Bell
- Feb 27, 2019
- 5 min read
Animation/mesh alterations
In order to increase immersion, from feedback I have received, I decided that I will add the third person character mesh onto the character, this way the player can see their bodies when they look down, this helps the player get a sense of presence and weight to their actions. I additionally included the animation set from the free animation starter pack epic offers.


Wall run
I started creating the wall run, at the moment it’s relatively rudimentary and needs work to refine it, but it works similar to the wall climb mechanic by switching the gravity on overlap, in this case forcing the player forward along the wall. Through changing the centre of gravity along the Z axis then adding 20000 force along the Z that simulates the effect of running along the wall. It checks a Boolean to see if the player is on the wall or not, if not, it will reset the gravity scale and centre of gravity back to 1, the player is back to normal.

Additionally I decided a double jump would be a fun idea, since it’s a sci-fi game and it doesn’t have to apply 100% to the laws of physics, I feel like this decision will add to the fun factor of the game, which relates to the main research of the overall project. This will require player testing in order to make sure that it has the desired effect on the player.
I did this by setting the blueprint in such a way that it gets a value of 2, then assigns that to the input action for the jump, the switch on int makes it so that the 2 times you press the space bar, it launches the player, one for the jump and one for the double jump. It then calls for an even on landed, which resets the counter after the player lands allowing them to double jump again.

Wall-run fixes
Now that my wall run is functional, I now want it to work better, and be more immersive. Top do this, I want to make it so that the player camera rotates in relation to the wall they are running on.

I did this by making 2 detection boxes either side of the player, when they overlap with an actor with the wall run tag, it activates a smooth but quick rotation of the camera via a timeline that rotates the camera on the X at a value of -20 to rotate left and 20 to rotate right. This deactivates when the box is no longer overlapping with the player. It is a little bit snappy at the moment and I may fiddle with the timeline in order to get the rotation even smoother.
Sliding
I have also implemented a sliding mechanic, it’s not perfect as of yet, there are issues with the fall off, the character comes to a sudden stop, I will fix this in future.

I did this by adding a sequence on the crouch that checks if the character is sprinting as they enter crouch, if this is true, then it launches the character forward relative to their forward vector (the direction they are walking/facing) at a value of 1000 which is the sprint speed.
In future I want this to result in a gradual stop, as opposed to a sudden one, this will help if feel more like a slide and less like a force is pushing the player along.
Fixing slide
Now this I have implemented my slide mechanic, I had to make sure that it was correctly implemented, the issues I faced were that I could slide in the air and that the slide did not slow down gradually and that the momentum was lost instantly after force was applied as opposed to a gradual decline in force as a slide would have in real life. Additionally, I found that the character would walk at the normal standing speed after sliding into a crouched position, and the character would not return to sprint speed from crouched when shift was pressed, it previously only stood the character up and the player would have to double press shift.

To fix the issue where the player has to double press shift in order to get back to sprint speed, I created a Boolean that checks if the player is sprinting.

I then created a branch at the end of the crouch mechanic that sets the player speed to sprint speed if they press the shift key (the run key)

I created a solution to the issue where I could slide while in the air. I created a Boolean that checks if the player is jumping, the slide will only activate if the player is not jumping via a branch.

The Boolean's for the is jumping check work off of the jump input, which sets it as active and the event on landed event which sets it as deactivated.

I found the fix for an issue where after sliding, you move at walking speed, this issue was caused as a result of the shift release key setting the speed to walk speed, to fix this I added a branch to the release that checked if the player was sprinting, and if it was, I linked it back to the crouch settings.

I fixed the issue partially where the player loses all momentum after sliding, I fixed this by altering the ground friction the player has while sliding, and made it reset back to its regular value after any other action is performed.

I fixed the slide further by changing the breaking friction factor to 0 on a slide then back to its regular value of 2 afterwards.
Slow motion ability
This mechanic was easy to make as not much blueprinting was required to achieve the effect I wanted.

When the player presses T (for time) the global time dilation, and a custom time dilation set to the character movement, slows down the movement of everything for a period of 3 seconds. This resets everything, following this is a 5 second cool down.
The problem I encountered was that the delay at the end, which was supposed to make it so that the player can’t use the ability for 5 seconds, did not work.

To fix this I created a branch that checks if time is slowed, if it isn’t, then it activates the ability.

After a delay of 5 seconds after the ability has been used, it sets the “is time slowed?” Boolean back to false, making it possible to reactivate the ability.
Firing Weapon

I created a firing system so that a projectile fires from an arrow point centred on the end of the guns muzzle, it gets the left click input for firing the weapon and spawns the projectile there at a force of 3500.
I will continue work on this in the future so that the player can aim down iron sights, as right now the player hip fires.
Comments