xi57
(Xist)
February 1, 2023, 7:29am
24
It’s not really any more complex. It just treats each key independently which is I think what the old input system used to do too?
I documented exactly what I did here to make it easy for others to duplicate:
opened 07:28AM - 01 Feb 23 UTC
tutorial request
Problem: In Lyra and Third Person Template for UE 5.0+ the WASD keys on the key… board 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.
Input Mapping Context:
<img width="259" alt="image" src="https://user-images.githubusercontent.com/25804900/215978080-19c5db29-025e-48a5-8b87-2bf1bb39ff0a.png">
Input Action Map:
<img width="466" alt="image" src="https://user-images.githubusercontent.com/25804900/215977833-65d0c5e2-d250-4016-beae-3780e60b6a5c.png">
I just sent all of the new input tags to the same function that is handling `IA_Move`:
<img width="1005" alt="image" src="https://user-images.githubusercontent.com/25804900/215978409-12d2d89f-3982-48cb-b9e8-820f5871a860.png">
Files changed for fix:
<img width="659" alt="image" src="https://user-images.githubusercontent.com/25804900/215976815-8f89f335-c1ef-4240-8716-d7faf508bcdf.png">
I know, I know... I shouldn't hack `LyraGameplayTags.cpp`... I know. 🤣
EDIT: I did submit a UE Engine bug for this, along with the fix. Hopefully they do fix this for Lyra and Third Person Template and wherever else it’s not working as expected.
3 Likes