UE5.4，Local multiplayer, two controller can't use two input mapping content.

zhangchenglei
Sun, 23 Mar 2025 20:18:04 +0000
Programming & Scripting

Thank you all.

Description

Local two-player game.

Player 1 uses the keyboard: wasd.

Player 2 uses the keyboard: up, down, left and right.

Player 1 and Player 2 use the same type of Controller, and the Controller will set different InputMappingContext based on CharacterId.

Since the move logic is the same, I create an InputAction called IA_Mode and create two new InputmAppingContexts, one of which sets the IA_Mode key to WASD and the other set the IA_Mode key to up, down, left and right.

ScreenShots

Phenomenon

There are two characters in the map.

WASD can control Player 1 normally.

The up, down, left and right buttons do not take effect.

Expect

WASD can control Player 1

Up, down, left and right can control player 2

1 post - 1 participant