top of page
  • Writer's pictureCallum Winfield

Devlog 2 - Player Movement

One of the most important areas of 3rd person action adventure game in my opinion is how the player moves and interacts with the world. Throughtout all the 3rd person games that have resonated with me, there is one thing that connects them all, Distinct and involved movement systems. If its either from the cover based shooter system from the Gears of War series, the fast paced combination of melee and shooting from games like Uncharted and The Last of Us or the weighty combo moves from God of War they all have distinct feel good movement that blends animation and directional speed perfectly. This is what I also want to achieve to a mild extent in The Wayfinder, obviously these games had years to perfect these systems so I will never achieve the same standard though I dont want to just creat something to check that box off the games to do list, I want this to be fresh and to have players instantly make note that the movement feels good.

One thing I first looked too was other games Ive mentioned above and how theyve tackled their movement systems. One example I kept coming back to was the video you can see above, which is footage captured from the last of us 2 dev room. Some of the main points I unpacked from this system was the small micro movements and adjustments from different states, for example when the player character goes from moving forward to looking to the side. It feels like a real body moving and not just a snap from different animation to another.


Root Motion

when looking into ways on how to achieve this simular feel in The Wayfinder, I came across a system called Rootmotion. This is an system that blends the use of animations directly into the movement system. Instead of using the typical character controller data that would use the directional movement of the characters collision capsul to play a certain animation, A rootmotion based animation uses the directional movement of the rootbone from an animation to drive the motion of the player's collision capsul.

The benifit of using this will be that we can achieve them smooth transitions between animations such as the walking states, this is due to the armature dynamically moving to the new location set by the animation corrisponding with the new input. Above you can see the example that first introduced me to the animation system.


Mixamo

As this movement system relies on a blend of multiple animations to move the character and no one in team is interested in focusing on animation I needed a way to get animations out quickly. So I decided to look into the animation software Mixamo which offeres a range of free animations and rigging tools. The software would be perfect though I would need to find a way to be able to export the animations to the Unreal skeleton, so they could be used in game.


Unreal Engine's Base 3rd Person Movement

Currently in the game file I only have the base movement that comes with a 3rd person project, a video of this can be seen below. The movement animations that are currently in place are very simple with there only being an animation for moving forward and jumping in the air, the player can also not move and look independtly so if the player moves the in a certain direction the whole character model will turn and face that direction.

This is the base node setup for the movement system in the Third Person Character Event Graph though this will take quite an overhaul during updating this animation system.

So the first step in updating the movement system is finding a way to bring animations from Mixamo into Unreal engine. I came across a converter program that brings the animations in Mixamo into unreal engine. With this installed I imported the base unreal engine 3rd person model into the Mixamo program to make sure the animations would work with the Unreal engine skeleton.

- The converter program requires you to take your downloaded animation files into an initial folder.

- Then initilise the converter which will take a few minutes to finish, once its complete the completed files will be found in the complete folder ready for Unreal Engine.

With the animations all complete, it was ready to bring them into Unreal Engine. I started by creating an animation blend space for the character and place the animations into the corresponding area on the axis. The video below show the setup for this screen, as you can under the viewport demonstrating the animations theyre is a grid set up with the animations. The grid is split up by 4x4 and shows the diferent directions of the character in the inner square with the centre point demonstrating the idle state of the character. The outer points are in place to show the character in a sprinting state.

Below you can see one of the early playtests of this movement system, It took along time of tweaking and reimporting animations to get any progress.

One main issue I found was that most of the animations wouldnt be able to do rootmotion, though this was an easy fix once I reimported all the animations. If I right clicked on all of them when highlighted in the project folder and clicked edit by mass, there is a quick option to allow rootmotion and update all settings for them in there.

Once this was inplace it was time to update the character's ThirdPerson_AnimBP. Below you can see the base AnimGraph layout currently which just the base movement state machine plugged into the character.

Inside of this state machine in the Idle/Turn tab I removed the nodes that where there from the base movement system thats in Unreal and plugging in the animation blendspace that was shown above and into that I plugged into some basic movement variable floats that define forward and sideways movement.

These variables where added to the main movement system so the new inputs would work with the established character controller.

I then wanted to add the ability for the player to be able to look freely around the world. Below you can see the first attempt though I had accidently not locked the right combination of axis in one of movement nodes so the following bug could happen.

With this final function fixed this was the final look of the movement, I sent this into the teams SLACK group chat to get some advice before moving forward. Some of the main points that where noted was the overall movement of the character

Crouching

With some of the issues I listed above sorted out I went on to add another feature to the movement which is crouching. This will be used to avoid the enemy A.I that hunts the player as they will detect you through visabilty in the enviroment.

Above you can see the rootmotion movement system I have attached to the crouch movement system. This movement system is alot simpler than the base system as it only has one base moves for left and right and moving backwards, though forwards does include a faster animation aswell that would be linked to the sprinting feature.

Then into the the animation blueprint and blending the two states by a bool node.

Then back in the character blue print I made a quick input press for crouch using the right mouse button down.

Above is how it looks in engine and below you can see a quick video demonstrating the current state of the movement system in the game.


16 views0 comments

Recent Posts

See All
bottom of page