top of page
James Burke

Individual UE4 Project #1 - Movement Design and Animation



To start this project, I have strung together movement and aim input in C++, and designed movement in a way which will complement the future mechanics of this game. To aid design decisions I decided to download Skyrim and see how they designed movement. While Skyrim is primarily meant for first-person perspective, it does have third-person and I thought it to be a suitable choice for basing movement from, as this is a simple mechanic and this game will have a sword-shield focus.

So far, I have also implemented functionality for jumping, sprinting and stance toggling (switch between a neutral and attack state).

This is an overview of this, showing all bindings thus far and the functions they will call- most have basic contents.

Also, in the constructor some metrics are set. For example, the setting for use of controller rotation in the character's rotation is turned off (it's false by default but this is just in-case), and the setting for setting the character's rotation based on movement input is set to true. This means that the player, by default will be able to look around the character without affecting their rotation. The second setting is more complicated as it is dependent on a few things.


Forward and Backward Movement

When moving forwards:

  • The player can sprint

  • Their speed should be set to the default speed if they are not currently sprinting (as other movement states may have changed the speed)

When moving backwards:

  • The player cannot sprint

  • The speed of the chacter will be reduced

The direction of movement will be based on the controller, rather than the character. This means that the camera will denote direction instead as its rotation is linked with the controller.


Left and Right Movement

When moving left/right, the player cannot sprint. The player could also be moving backwards or forwards. As speed is different between the two states, the code determines whether they are currently walking forwards or backwards to set their speed.


More importantly, the character's rotation is set to be aligned with the direction of the controller, which will be wherever the camera is facing.


Changing Stance

This will be a toggle between being neutral (sword down) to aggressive (sword up). In the aggressive state, the direction of rotation should match that of the controller, as the player will have to aim their attack towards an opponent, this setting will be set to true in this state.


Also, there is a broadcast of this change in stance.

On line 9 shows the declaration of the dynamic delegate.

In the animation instance, a listener to the broadcast is added by default. The function it calls simply sets a boolean which indicates which stance the player is in.

This boolean will be read in blueprint to determine which animation state to use.

Overall, I am currently using an animation blueprint, and two blendspaces. One for neutral movement, the other for aggressive movement.



Recent Posts

See All

Comments


bottom of page