Virtual joysticks not working on pc but work on mobile

Hello i am trying to make a mobile game and i am pretty sure that i ran into a bug. For some reason i am not able to use the virtual joysticks while testing on pc, but if i ship the game and open it on mobile it works fine. I also tried creating blank projects. Then i realized that when i go to other templates such as 1st or 3rd person the virtual joystick works until you let go. As soon as you stop release the joystick on the pc you can no longer interact with it.

Any advise?

UE4 4.12.5
Windows 64bit
downloaded from epic launcher

Hi Zy_lack,

for submitting a bug report! Unfortunately I was unable to reproduce your issue, here are the steps I followed.

  1. Started a new First Person project set for mobile with maximum quality and no starter content.
  2. Opened character blueprint and selected the Event Graph tab.
  3. Right click and type “Get Player Controller” then hit enter to spawn the node.
  4. Drag off of return value and type “Set Show Mouse Cursor” then hit enter to spawn the node.
  5. Make sure Show Mouse Cursor box is checked.
  6. Connect Event Begin Play into the Set Show Mouse Cursor and then connect to the rest of the nodes that were already there. (See Screenshot)
  7. Play in editor and use the mouse to control virtual joysticks.

I hope that helps and if I missed something or you want some additional clarification feel free to ask!

Ed, for the helpful tip! I’m just wondering why in the Epic Games tutorial videos, when an instructor is making a game on PC, then also goes to test on the mobile preview, the joysticks work right away without any hassle. I have to try to hold Ctrl and left click to make the joysticks move, but of course, I can’t see the mouse at all.

After following your tip, I can see the mouse, but I’m not sure why the mouse used to appear and work instantly (in the tutorials), and of course, I’m also not sure why the outer circles of the joystick often bounce around the screen (they don’t stay properly anchored in place when clicking).

Additionally, the Epic Games instructors would be able to close the Mobile preview window just by hitting the “X” on it… but in my case, the mouse won’t navigate outside the window. Currently I’m hitting ALT-Tab and then right clicking the window in the taskbar to close it. I guess something got broken in recent updates? Or there’s perhaps some new checkbox I’m unaware of that needs to be selected in the preferences to make it all work?

for any help!

EDIT: ALT-F4 seems to work to close the window, but the mouse still can’t go outside the window border.

Hi AJ,

Could you link the particular tutorials you were following?

Regarding the mouse not leaving the window they probably pressed shift+F1 to allow the mouse to leave the viewport. Depending on the tutorial it could very well be that the project was already prepared for the tutorial.

,

, Ed for your reply. Well in this tutorial, the instructor doesn’t get a mouse cursor either, but he’s able to control the game fairly easily and regain mouse control using Shift-F1 to click the window’s X button. Unfortunately, in 4.13, the virtual joysticks can’t really be selected at all, at least not in a usable way (even with Project Settings > Engine - Input > Use Mouse for Touch enabled). Additionally, Shift-F1 does nothing, and the cursor can’t be used to close the window.

And in this older tutorial, at the 9:12 mark, the mobile preview gets both a visible cursor and the ability to X the window.

again for your help, Ed!

~Adam

Good morning, Ed,

I just tried something out, maybe it will help to explain what I’m experiencing.

I opened a new project of the Third Person template.

Without modifying anything, when I click Mobile Preview, the first thing the mouse does is control the camera. When you click, it sort of “wakes up” the joysticks (and if that doesn’t work, you may have to hit Ctrl while left-clicking), and you can sometimes select them, but it’s nearly impossible to do without seeing where your mouse is. When you do finally select one, the entire joystick will often get dragged to a new location instead of staying anchored in place. Eventually it will bounce back to its starting position after enough clicking. (To be fair, this unusual jumping behavior was exhibited even in the tutorial to some extent, so it’s likely that the bug has existed at least since 4.8.)

Nevertheless, your helpful tip is a total lifesaver, as now I’m able to see where the mouse is clicking, which is great. I’m still not able to hit Shift-F1 to regain mouse control to close the window, but at least it’s much easier to control the character.

However, in the tutorial from 13:16 onward, you will see that the instructor is able to use Shift-F1 to regain mouse control to also see where he’s clicking.

I hope this helps… and sorry if I’m missing something obvious, as I’m still extremely new to Unreal Engine. I’m really thankful for what all of you at Epic Games have made Unreal Engine into… it’s a real pleasure to learn the software, and the wealth of training resources you’ve provided is invaluable. :slight_smile:

Hello AJ,

At the beginning of the tutorial he is using a Gamepad to control the character (an Xbox360 controller for example).
That is why you don’t see any signs of a mouse being used.

Regarding the issue of your mouse getting stuck in your play window this is a result of your mouse getting “captured” on play. You can change this setting in the project settings under the input section. Once you are there type “capture” in the search window and have your settings be just like in the screenshot.

The virtual joystick jumping around is known and won’t be addressed at this time.

Hope that helps,

You are brilliant, Ed!! so much–that worked perfect. :slight_smile:

Go to ProjectSetting → Engine/Input → Mobile → Always Show Touch Interface(Tick on)
This will working in PC with TouchScreen.
if you want use mouse to test the virtual joystick, also tick on the [Use Mouse for Touch]

1 Like