Alright we got some nice controls so far, let’s add a little something extra with a dash move. To keep it simple I’m just going to use the LaunchCharacter() function to give my player an instantaneous speed boost in whatever direction they’re facing. Trigger it when the user presses left shift.

That works just fine for now, I want to revisit this later to make the dash feel more rigid, with a set travel speed and a sharp reduction back to default speed. I think a linear interp is what I’m after here.
For now I’m getting kind of bored just jumping around an empty sandbox, time to add some simple enemies. For this first step I’m just going to grab some skeletal meshes I downloaded years ago, they already have animation blueprints so that’s convenient and they look like the grunts from Halo. I’ll get them to just move towards the player, and make sure they’re facing the player while they move.

Some easy vector math to get the movement direction between the enemy and the player. Vector from A to B = B – A in vector math. Take that result, normalize it, scale it by 200 for a decent speed value, and multiply by the DeltaTime to keep the rate smooth as tick runs this function. We just keep updating the enemy’s location as they run this function and it gets the appearance of the unit moving. Since all these guys do is lumber towards the player I just set their animation to a walking one for now, maybe I’ll deal with Behavior Trees soon, getting them to stop and a shoot in which case I’ll handle swapping the current animation.
Turned out to be a bit of a headache figuring out how to get rotation towards a location from scratch. So I use the UKismetMathLibrary::FindLookAtRotation to do the heavy lifting here. There was a little but where the enemy would rotate their Pitch when you were above them on a platform, so a little fix here to just maintain the same pitch regardless of where the player is.
Next up I’m going to throw some health bars on these guys, and maybe I’ll throw in some floating damage numbers Borderlands style.
