Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Local Multiplayer mobile movement


I'm trying to develop a 1 to 4 local multiplayer game for android, and when it comes to movement I have some questions:

I've been looking into UMG and into touch interface and what I would like is to have 1 joystick per player that will allow them to move. But I'm not sure if this is possible because:

  1. Touch interface only seems to support up to 2 joysticks, and you can't load more than one touch interface as far as I'm aware.

  2. I can't see a way to tell the touch interface what it should do. I want this joystick to move THIS PLAYER CONTROLLER.

  3. UMG doesn't seem to have AXIS support ?

What is the right way to approach this?


Product Version: UE 4.15
more ▼

asked Apr 25 '17 at 07:36 AM in Blueprint Scripting

avatar image

13 5 14 12

avatar image RoseRen0126 Aug 02 '18 at 01:47 AM

Hi, have you solved this problem? I Have the same problem. I am also trying to develop a multiplayer game for android, I add a joystick on the interface to move the local player, But it's weird that the touch interface on both side of the two player move the first player, when I push the joystick on player 1, player 1 moves, however, when I push the joystick on player2, the player 1 moves and player 2 dosen't

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first


Sorry for the late late reply. I didn't have a pc when I read the question and then I spent days looking for the project that I did but I can't find it. Luckily I do remember how I did it :).

First create your own player controller and your own Pawn.

Then on the project settings define input settings. (This is a bit of a hack but it does the trick.)

Define 2 axis inputs, so P1MoveForward, P1MoveRight, P2MoveForward P2MoveRight. Now this is where the hack comes, You need to bind this defines into different types of axis. So for example make P1MoveForward and P1MoveRight match Gamepad Joystic X, and P2MoveForward and P2MoveRight match Gamepad Joystic Y.

The idea is that with a controller you would move Player 1 with the left joystick and Player 2 with the right joystick.

Now you need to create a UI that includes 4 touch joysticks and bind them to the different inputs, I don't remember this exactly but that should be easy as the example already comes with the touch input bind to something?.

Finally you need to make 1 player only care about one inputs and another player only care about other inputs. There are multiple ways of doing this.

You can have 2 controllers (of different types) , and each player has each controller . And have different SetutInput functions on them.

Or you could have two different types of pawns with different SetupInput function.

You could even have only 1 controller that has possessed player 1 and has a reference to player 2 and whenever player2 Input gets trigger just does pawn2->MoveForward() for example.

However you wanna do it is up to you, but I think the trick was into binding different inputs to different tools that unreal provides such as different joysticks from different gamepads.

more ▼

answered Aug 08 '18 at 10:04 AM

avatar image

13 5 14 12

(comments are locked)
10|2000 characters needed characters left

my guess is that maybe touch inputs all always go to player controller 0, so you might need player 0 to relay that and call its respective functions with parameters on player 1's controller

more ▼

answered Aug 06 '18 at 12:06 AM

avatar image

3.7k 18 19 20

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question