Hi everyone,
I’m working on a project in Unreal Engine 5 where I want two Xbox controllers to control the same character. My goal is to have:
- Parent controller (Controller 1): Full control over all functions.
- Child controller (Controller 2): Limited control over specific functions, as defined by the Parent.
I’m using the Enhanced Input system and have created two separate Input Mapping Contexts (IMCs) for Parent and Child.
What I’ve done so far:
- Player Setup:
- Both controllers are detected correctly by Unreal and are assigned Player Index 0 and 1.
- I’ve set up a custom
BP_PlayerController
. In this blueprint:
PlayerController for Player 0 (Parent) is assigned theIMC_Parent
.
PlayerController for Player 1 (Child) is assigned theIMC_Child
.
- Input Assignment:
- I’m using
Add Mapping Context
nodes to assign the correct IMC to each controller. - Parent Mapping Context has Priority 0, and Child Mapping Context has Priority 1.
- Debugging:
- Parent controller works as expected and can control the character.
- Child controller doesn’t affect the character but does interact with the UI, which means the input is being detected but not applied to the character.
The Problem:
The Add Mapping Context
for the Child controller doesn’t seem to apply to the character. It feels like only the Parent Mapping Context is being used. My Child Mapping Context is never executed for character movement or other actions.
What I’ve tried:
- Ensuring the PlayerController Blueprint is set as the default PlayerController in the Project Settings.
- Verifying that both controllers are registered with the correct Player Index using debug prints.
- Manually assigning the Mapping Context in the
BP_PlayerController
for each player. - Adjusting priorities for the Mapping Contexts.
What I Need Help With:
- Is there a known method to reliably assign and use separate Input Mapping Contexts for two controllers controlling the same character?
- Is there anything I might have missed in my setup?
- Can anyone share examples or documentation for this type of setup?
I’ve been troubleshooting this for quite some time, and I feel like I’m close, but something is still missing. Any guidance or advice would be greatly appreciated!
Thanks in advance for your help!