Einar
Einar is a third person hack and slash based on Norse mythology. The player takes control of Einar, using bow, hammer and axe to clear a strange infection from a Norse fishing village.
On this project I worked mostly on gameplay programming focusing on the combat systems, most notably archery.
I also did some work on the camera systems, and I worked on implementing the player character animations through the animation blueprint and some C++ work.
On this project I worked mostly on gameplay programming focusing on the combat systems, most notably archery.
I also did some work on the camera systems, and I worked on implementing the player character animations through the animation blueprint and some C++ work.
Here you can see some of my blueprint work on the ranged combat, as well as the accompanying animations and some of the tools I needed to do this.
The first image, seen above, shows the response to pressing the main attack button. If the player is currently aiming, it will start charging a shot. Otherwise it will fire a short-ranged attack at a nearby target.
The second image, seen above, shows the aiming, triggered by pressing the secondary attack button. When pressed, it sets the character into aiming mode, and removes any targets it may have been locked on to. It also moves the camera back to behind the character. When released, it resets the camera back to where it should be and sets the character back to a non-aiming state.
The third image, seen above, shows an update to the player character's upper body animation, ensuring they look up and down depending on where the player is aiming. You can also see a call to the "GetSignedVectorAngle" macro, which is shown in the next image.
This last blueprint, seen above, shows the GetSignedVectorAngle macro, which when given two vectors and a plane normal will return the signed angle between the two given vectors. This is an example of functionality that UE blueprints lacked by default, so I added it myself.
Here you can see some of my C++ work when trying to improve the player's attack animations. It is divided into two parts, each of which are explained below the image.
The first part allows the player to rotate in between attack animations, to allow them to change direction in between attacks. Without this, the player was locked into one direction of movement once they began attacking, and had to stop their attack combo to change direction.
The second part ensures the player maintains their momentum if they start an attack while moving. Rather than coming to a full stop and entering the attack animation, this code allows them to maintain their velocity when entering the animation, slowing down to the required speed over a curve that can be modified easily. This code in combination with the curves can also be used to add velocity to the player when entering certain attack animations that are supposed to leave the player with some velocity afterwards, or move the player during the animation.
The second part ensures the player maintains their momentum if they start an attack while moving. Rather than coming to a full stop and entering the attack animation, this code allows them to maintain their velocity when entering the animation, slowing down to the required speed over a curve that can be modified easily. This code in combination with the curves can also be used to add velocity to the player when entering certain attack animations that are supposed to leave the player with some velocity afterwards, or move the player during the animation.