Download

Need help with player controls

Hello every one:)
I would like to do something like that:
hud_control.png

  • Green screan is game viewport

  • Yellow is the hud with buttons

  • Grey (ish) is the tablet control stick

  • When I press the “walk” button I want to use stick to walk forward / backward and turn

  • When “Look” button is pressed I want to use stick to look around

  • When “Fly” button is pressed I want to control the z-axis - how camera is above the ground

It’s all in first person view.

Could You please help me how to start , because I’m totaly noob, and can’t figure it out.
guest i need to:

  1. Make one stick
  2. Make HUd with buttons
  3. Assing axis mapping from buttons pressed

Greatings, Marcin

You don’t need to use Axis mappings for the buttons, but create buttons in UMG that have events associated with them.

You can’t create and place a virtual stick that is identical to the dual virtual sticks that Epic provide, but you can create your own using the supplied Touch events, which include X & Y coordinates and add your own GFX on top. I can’t provide a detailed breakdown of exactly what is required right now, but I’m sure there’s tutorials out there.

EPIC, how about giving us the ability to add and position as many virtual thumb sticks we want to a project via the ‘Input’ section of ‘Project Settings’? Or at least specify between one or two thumbsticks and their locations?

You can control the virtual joysticks by creating a custom Touch Interface in the Project Settings Engine->input panel. In the Mobile group, use the Default Touch Interface dropdown to select Create Touch Interface Setup, save it, then edit it. You can add as many controls as you want with differnt images, centers, sizes, opacity, etc. You can also turn on Prevent Recenter if you don’t want the control moving around.

You can also start quickly by copying one of the default Touch Interfaces in the Engine/Content/MobileResources/HUD (DefaultVirtualJoysticks.uasset or LeftVirtualJoystickOnly.uasset) and editing it.