Smooth locomotion pt1


Following further deliberation, I have decided to implement smooth locomotion into the project.

To do this, I started off thinking that I needed to change the VR pawn into a character actor. After looking into the different actors, I discovered that if I change the parent actor of the VR pawn to character I then have access to movement controls. 

I made an enhanced input action for movement X and movement Y, made them a 1D float axis and added a dead zone modifier. I added these input actions into the IMC_Default input map and assigned the Oculus Touch left X and Y thumbstick axis on the controller.

I then coded the input to add a movement input to the VR pawn in conjunction with a MoveSpeed float variable to speed the movement up to a suitable level. 

Currently, I have the forward/back movement working but not left/right. I need to look through the blueprints I made to see why the X axis isn't working.

Edit: 19/04/23

I have adjusted some of the code in the character blueprint that I have linked screenshots of. I broke the vector to acquire just the X axis and added a movement input into the pawn blueprint. This creates a more robust X movement. It will need a bit of tweaking to make the movement more smooth but it actually works now. A video of the movement system has been attached.

Learning this system has taught me about the new enhanced input actions and how to make new inputs. I also learned about input modifiers like dead zones, and I now feel comfortable adding more inputs in the future.

To help learn the process of implementing this system, I used the youtube video attached. While it didn't portray the information I needed in a clear way, it did nevertheless help me. I had to adapt some of the code to make sure it fit with my project but with the most recent version of UE5 being so new, very few resources were available to help with the new enhanced inputs. I'm sure this will change with time.

https://www.loom.com/share/0429677349e54890a7fdd7c85ba1ceae

Leave a comment

Log in with itch.io to leave a comment.