-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Problem: In Lyra and Third Person Template for UE 5.0+ the WASD keys on the keyboard to not work as expected. Pushing multiple keys in particular is broken. W+S keys should cancel out. A+D should cancel out. By default the examples Epic provides for IA_Move do not work this way and it feels broken.
Solution: for Keyboard Only, delete the keyboard IA_Move triggers, and add 4 different input actions IA_MoveForward, IA_MoveBackward, IA_MoveLeft, IA_MoveRight, which are mapped to your WASD keys instead of all 4 going to IA_Move.
With such a setup, pushing all 4 keys simultaneously will result in zero movement.
NOTE: I believe Epic may be looking to fix this, possibly as early as 5.2. If you need to fix this yourself in 5.1 or 5.2, here is the procedure:
Input Mapping Context:
Input Action Map:
Make sure for each one you copy, to copy the same settings as you see in IA_Move for this key.
Also copy the settings for the "player mappable" slot:
I just sent all of the new input tags to the same function that is handling IA_Move. In Lyra it's called Input_Move.
(In vanilla Lyra you'll want to edit ULyraHeroComponent::InitializePlayerInput. I derived a custom UXCLPlayerInputComponent based on ULyraHeroComponent).
For details on the LyraGameplayTags hacks made, see this comment (below) courtesy of @WhyAreLess
Also note: The above screenshot was using Lyra 5.1 style tags. After updating to Lyra 5.2 style Tags, the code looks slightly different, but the fix is essentially the same.
Files changed for fix:
I know, I know... I shouldn't hack LyraGameplayTags.cpp... I know. 🤣





