# 5.1 local multiplayer not working

**URL:** <https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733>\
**Category:** Getting Started & Setup\
**Tags:** bug, broken, unreal-engine\
**Created:** [November 23, 2022, 8:08am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733 "2022-11-23T08:08:18Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Nimillion](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nimillion/32/897252_2.png) [@Nimillion](https://forums.unrealengine.com/u/Nimillion)\
**Post date:** [October 4, 2023, 3:16pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/43 "2023-10-04T15:16:57Z")

</div>

Perhaps, I haven’t renamed some of the code properly. I’m not sure as I tried this soon after you posted your code and I can’t remember what was wrong (this was my first time making changes in C++ as well so there could be many things I might have done wrong). I think I was getting errors and could not compile the new code. Thank you though, I will post here once I get back to this.  
I still have many other things to do in the meantime and I keep having weird bugs since I moved to 5.3 so there is no shortage of things to fix for me!

I finally understand what you mean with bug reports 🙂 I’ll see what happens once I start submitting mine! It kinda sucks that the tickets are actually filtered…

I’m surprised how responsive you both are. That’s awesome

Cheers

---

<div class="post-metadata">

**Author:** ![Lempasq](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lempasq/32/760186_2.png) [@Lempasq](https://forums.unrealengine.com/u/Lempasq)\
**Post date:** [October 7, 2023, 5:46pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/44 "2023-10-07T17:46:03Z")

</div>

Just tried it on 5.3, and it worked!  
Now my keyboard send input to controller 0, and gamepad to controller 1  
Thank you!

---

<div class="post-metadata">

**Author:** ![EpiKnightz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EpiKnightz](https://forums.unrealengine.com/u/EpiKnightz)\
**Post date:** [October 16, 2023, 6:53am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/45 "2023-10-16T06:53:05Z")

</div>

It works for me (5.3) too! Thank you very much.

Just FYI to anyone reading this, you also need to include “ApplicationCore”, “Slate”, “SlateCore”, “EngineSettings”, “EnhancedInput” dependency to your Build.cs file in order for it to be linked.

---

<div class="post-metadata">

**Author:** ![poet](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@poet](https://forums.unrealengine.com/u/poet)\
**Post date:** [November 13, 2023, 7:28am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/46 "2023-11-13T07:28:31Z")

</div>

> [@DaveFace](#):
>
> mentioned he c

Can you share your solution with detail? Thanks

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [November 15, 2023, 6:58am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/47 "2023-11-15T06:58:57Z")

</div>

I’m not seeing this behavior? Skip controller with gamepad project settings still don’t appear to be working in 5.3 binary (launcher)

Edit: Nevermind I see now you were talking about the custom viewport code class… the forum has a strange way so showing replies.

For anyone interested in a well documented mapping system I did find this when searching for any PRs related to the Skip Player 1 bool  
[Add functionality to map devices to player controllers by KristofMorva · Pull Request #5209 · EpicGames/UnrealEngine (github.com)](https://github.com/EpicGames/UnrealEngine/pull/5209/commits/3b2ae4b8a455715a6072a5f71e549515b3623775)

---

<div class="post-metadata">

**Author:** ![DaveFace](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daveface/32/597060_2.png) [@DaveFace](https://forums.unrealengine.com/u/DaveFace)\
**Post date:** [November 22, 2023, 6:58pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/48 "2023-11-22T18:58:10Z")

</div>

You’ll need to create a new C++ class inheriting from GameViewportClient, copy the code I posted into the header/cpp file (renaming it to match your class name etc), and set that as your viewport class in project settings.

If you’re not familiar with C++ you’ll probably want to watch a few tutorials on that, and those instructions will make sense.

---

<div class="post-metadata">

**Author:** ![Pierrax](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pierrax/32/596699_2.png) [@Pierrax](https://forums.unrealengine.com/u/Pierrax)\
**Post date:** [December 31, 2023, 10:23am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/49 "2023-12-31T10:23:30Z")

</div>

Hey, anybody found a solution for this ? i’ve been trying for 3 days without any success…

Also i don’t know C++, have no idea how to even start to learn this.

---

<div class="post-metadata">

**Author:** ![yosheDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@yosheDev](https://forums.unrealengine.com/u/yosheDev)\
**Post date:** [January 29, 2024, 3:45pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/50 "2024-01-29T15:45:30Z")

</div>

I’ve tried this and hooked up some print nodes to debug. The print nodes come out just fine, but I still can’t get it to work. Think you could make a detailed explanation?

---

<div class="post-metadata">

**Author:** ![user\_1af7d8b8caf389cac8fcc6a36defb1f0e56e3a58e47b6fab4867f2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_1af7d8b8caf389cac8fcc6a36defb1f0e56e3a58e47b6fab4867f2](https://forums.unrealengine.com/u/user_1af7d8b8caf389cac8fcc6a36defb1f0e56e3a58e47b6fab4867f2)\
**Post date:** [February 4, 2024, 6:54am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/51 "2024-02-04T06:54:46Z")

</div>

Hi man .Can you share your project with me? I test the code .it doesn’t work . I change the game view . But still cann’t control player2

---

<div class="post-metadata">

**Author:** ![Madein1987](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Madein1987](https://forums.unrealengine.com/u/Madein1987)\
**Post date:** [February 17, 2024, 7:58pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/52 "2024-02-17T19:58:24Z")

</div>

Greetings!  
I found a way to make the local multiplayer work. I am on 5.3 and the problem persisted.  
I followed this guide but still it would not work, the 2nd controller does not respond:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/a/75a13cfbc01296bc5ac47f45f2ae0078b1d703ac.jpeg "UE5.1 & UE5.2 Local Multiplayer Fix/Tips (Gamemode Logic)") ](https://www.youtube.com/watch?v=QSnUqHF6X0M&t=424s)

Now, what I did was the following:  
In the thirdpersoncharacter blueprint, after the Event beginPlay  
node, the next node I put is a Delay node of 0,1 second. And it worked.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/e/dfe26df2f5f97c68c03470488501822f919b875e.png)

I am not entirely sure why but I think what is happening is that the enhanced input local player subsytem is activating before the other players are created, and thus they receive no mapping context at the time of their creation. With a delay of 0,1 (or any other delay), I think the other players are created first and then given a mapping context.

---

<div class="post-metadata">

**Author:** ![mandave98](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mandave98](https://forums.unrealengine.com/u/mandave98)\
**Post date:** [February 21, 2024, 3:28pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/53 "2024-02-21T15:28:11Z")

</div>

> [@DaveFace](#):
>
> oozeGameViewportCl

Hey thanks! This worked perfectly for me.

---

<div class="post-metadata">

**Author:** ![Zapheroc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zapheroc](https://forums.unrealengine.com/u/Zapheroc)\
**Post date:** [March 16, 2024, 7:17pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/54 "2024-03-16T19:17:46Z")

</div>

Confirming that this bug is still present in UE 5.3. Any news of a bug report or fix in the works for this? It’s a pretty frustrating issue and seems like it would be easy to fix.

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [March 25, 2024, 1:34pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/56 "2024-03-25T13:34:08Z")

</div>

This now appears to be fixed in UE5.4 Preview

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/a/75a13cfbc01296bc5ac47f45f2ae0078b1d703ac.jpeg "UE5.4 Preview Couch Coop Local Multiplayer Template (Skip assigning gamepad to player 1 fixed)") ](https://www.youtube.com/watch?v=si6qGtC5P0A)

---

<div class="post-metadata">

**Author:** ![DaveFace](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daveface/32/597060_2.png) [@DaveFace](https://forums.unrealengine.com/u/DaveFace)\
**Post date:** [March 31, 2024, 10:15am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/57 "2024-03-31T10:15:27Z")

</div>

Nice to see that it’s finally fixed. Shame it took them over a year and they never acknowledged any of the bug reports, but that seems pretty standard for Epic these days.

---

<div class="post-metadata">

**Author:** ![TC9](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tc9/32/888137_2.png) [@TC9](https://forums.unrealengine.com/u/TC9)\
**Post date:** [April 1, 2024, 8:09pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/58 "2024-04-01T20:09:52Z")

</div>

Can someone help me? I’ve been trying to find a solution by reading this forum, trying out the methods presented, watching videos, and getting help from Discord, but I’m still stuck.

I created a Local Player with the Controller ID being 1.

I added Mapping Context with the Local Player as the Target.

I possessed my character using the created Player Controller.

The inputs don’t work when PlayerController\_0 is being used either.

(The blueprint is in my GameMode)

**Problem:** My inputs don’t work and I can’t move my character. Any help would be appreciated!

 ![Screenshot 2024-04-01 125645](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/a/c9a38569564189eaef77d94345afab0459085e13.png)  
 ![Screenshot 2024-04-01 125652](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/6/016824b068ebf8a5abfd31be36679ad2f944361f.png)  
 ![Screenshot 2024-04-01 125701](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/6/0763f5cf05176c9e6d517e7d23c9bdf8b19bfd59.png)

---

<div class="post-metadata">

**Author:** ![TC9](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tc9/32/888137_2.png) [@TC9](https://forums.unrealengine.com/u/TC9)\
**Post date:** [April 2, 2024, 2:04am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/59 "2024-04-02T02:04:55Z")

</div>

Never mind, I was able to figure it out!

It took me 6 days for something so simple!! I overcomplicated the whole thing because for my game I didn’t even need to use multiplayer and create a local player. I just used the Player Controller with index 0, two different Mapping Contexts, and Inputs, then I called them and checked my Player Variables if P1 = 1 or P2 = 2 to execute the movement. I’m so relieved right now.

---

<div class="post-metadata">

**Author:** ![schuan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/schuan/32/1069222_2.png) [@schuan](https://forums.unrealengine.com/u/schuan)\
**Post date:** [April 4, 2024, 5:14pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/60 "2024-04-04T17:14:40Z")

</div>

Hey guys. So it seems the solution for the “Skip Assigning Gamepad to Player 1” will be fixed in 5.4.

If you are in 5.3 and don’t want to mess with the C++ code or you have a BP only project, here you have a Plugin that I made that implements the exactly same fix that will be in 5.4.

It will only work on Windows and UE 5.3 but you can compile it for your platform yourself.

Steps:

1. Download the custom Plugin [GameViewportLocalMultiplayer.zip - Google Drive](https://drive.google.com/file/d/1MME6S_DV5pJ2MmoQIrifiehe5RKBvJxk/view?usp=drive_link)
2. Unzip and add it to your project in the Plugins folder.
3. Open the Project (Enable the plugin GameViewportLocalMultiplayer) and go to Project Settings - Game Viewport Client Class and replace the current vlaue with the CommonGameViewportMultiplayer.
4. Restart and Done

BTW: This will work with Common UI Projects so this Plugin inherits from Common UI Game Viewport. Just in case

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/c/86c38da90e44143abde21f56f36e782cbaf27334.png)

Let’s wait for the final 5.4 fix but at least you have this for the moment 🙂

---

<div class="post-metadata">

**Author:** ![DaveFace](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/daveface/32/597060_2.png) [@DaveFace](https://forums.unrealengine.com/u/DaveFace)\
**Post date:** [June 9, 2024, 2:36pm UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/61 "2024-06-09T14:36:02Z")

</div>

Our team did the upgrade to 5.4 and while this specific issue is _sort of_ fixed, the whole ‘Platform User’ system seems to have broken a lot of other stuff. Part of this might be me misunderstanding the system, but as usual Epic have not documented any of their changes, so it’s hard to be sure.

Right now, my game is working like this:

- In the GameInstance, on init, run ‘CreateLocalPlayerForPlatformUser’ until it doesn’t return a valid PlayerController
  - This is because we want to listen to some kind of ‘join’ button event from the player, e.g. the lobby screen
  - If you don’t do this then you only get one player controller, and the Keyboard and Gamepad both get assigned to it - **the bug is only partially fixed, if only one player controller exists it will ignore this setting and assign the gamepad to the same player**

- In the GameInstance, bind to the OnInputDeviceConnectionChange event
  - This is a new event that **finally** exposes when an input device connects/disconnects to Blueprints (it was in C++, Epic just didn’t expose it for reasons)
  - When a new device is connected, ensure it has a player controller
  - When a device disconnects, get it’s player controller (GetLocalPlayerControllerFromPlatformUser), and tell it to unpossess it’s pawn

At first this appears to work, when I ‘join’ on my keyboard I get one player, and when I join on my gamepad I get another. But if I disconnect my controller, the keyboard player gets unpossessed.

On my player controllers, I hooked up a print statement to the possess event to show ‘GetPlatformUserId’ - when I join on my keyboard it shows ID ‘0’, and on my gamepad it’s platform user ID ‘1’. But when my controller disconnects ‘OnInputDeviceConnectionChange’ reports that platform user ID ‘0’ has disconnected…which is the keyboard.

The comment for ‘GetPrimaryPlatformUser’ suggests that ‘0’ is the default for things like a keyboard and mouse which don’t get assigned a unique ID. But it looks like the first gamepad connected also gets this ID, so we’re back to square one where ‘Skip assigning gamepad to player 1’ doesn’t apply to platform user IDs.

My current workaround looks like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/1/0b132182171ea72daeb30af4209e12373087746d.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/1/b/91bda320f1cdb4b82e621dec543d077fda89491f.png)

---

<div class="post-metadata">

**Author:** ![Uno1982](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/uno1982/32/982436_2.png) [@Uno1982](https://forums.unrealengine.com/u/Uno1982)\
**Post date:** [June 11, 2024, 3:11am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/62 "2024-06-11T03:11:48Z")

</div>

thanks for keeping us updated … I think I’m still using direct controller and stored index vs platform user due to this exact reason.

---

<div class="post-metadata">

**Author:** ![Soar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/soar/32/967117_2.png) [@Soar](https://forums.unrealengine.com/u/Soar)\
**Post date:** [August 13, 2024, 7:18am UTC](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733/63 "2024-08-13T07:18:23Z")

</div>

Thanks so much @schuan - that worked!! Please let me know where I can send you money for a coffee! Everyone else, @schuan 's plugin was the solution for us as it worked in Unreal Engine 5.3.2, enabling us to have one player on keyboard and one using an Xbox controller in local co-op. 🙂

[Previous page](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733.md?page=2)

[Next page](https://forums.unrealengine.com/t/5-1-local-multiplayer-not-working/713733.md?page=4)
