Download

Button like Touch Inputs for a flight game

Hello all! I’ve been studying Unreal Engine for 1.5 week and half of my time (or maybe more) spent on reading and watching tutorials, experimenting on sample maps etc. and at last I managed to make a very nice and fast flight system. Controls are really excellent. You can maneuver easily in even most tight areas and situations. I’m planning to have it on google play. It really is fun. But because I am such a noob, although I planned to do this for mobile, I designed it’s system for PC first :stuck_out_tongue: So now I installed Android SDK and tested on a tablet… well even I carefully calibrated that virtual joystick, nevertheless it’s awful. You can’t make any maneuver, escape from nowhere and it’s not fun (obviously).

So… Virtual joystick isn’t my thing. I have Carmageddon 1 on mobile and it’s controls are impressive. I play it with button interface. Though it has virtual joystick support but it has the same problems. So… I really searched answerhub, here, google, youtube but I couldn’t find any solution to this. And because I have zero programming skills and very tight blueprint knowledge, if possible can anyone explain me how I can create button inputs for touch like the image I made here?

I want to control the vehicle on left of the screen and make it’s roll movement on right. On PC, you control the vehicle with WASD and make it’s roll movements with left, right or left,right mouse buttons. And it’s really easy and fun. Also when you press space, you teleport in forward position (not far) in every 10 seconds.

by the way I’ll post a video sometime!

So, I see that I can achieve this not from controller inputs but from UMG. I watched HorusHeretic’s UMG tutorials on youtube and also I looked about dozens of similar videos, answerhub questions etc. and I saw that they are all about menu items or similar.

I couldn’t see any posts about binding input axis movements to UMG Widget buttons. Is it not possible to do that?

Dear Eternal Wanderer,

I am not sure about capturing axis inputs directly to UMG buttons,

buuut


**Solution**

1.Just set input mode to UI + game viewport

2. Capture the axis movements using your Player Controller BP, by setting up Input Events in Project Settings -> Input

3. and then you can pass the input from player controller to your UMG widgets.

You can use my Get All Widgets Of Class BP node to dynamically find your widget from your PC.

https://forums.unrealengine.com/showthread.php?3851-(39)-Rama-s-Extra-Blueprint-Nodes-for-You-as-a-Plugin-No-C-Required!&p=179029&viewfull=1#post179029

Thanks for helping Rama! I started to do it though I don’t know how to pass inputs from player controller to widgets.

This is my inputs from project settings:

5096cc6e95ec093eb3b1e0144b38abc9808db62b.jpeg

My player controller, BP_Plane’s blueprint’s input nodes

6000ed8fcab45e6b54e11cd83500ab12c60c550b.jpeg

This is the template of my controls widget.

And lastly, here the graph of the widget (which I made it totally wrong I think:P )

82f93b28600f3980b974f29e63eedc2738a9c09c.jpeg

And also I can’t see the widget for connecting to “In Widget to Focus” in “Set Input Mode UI Only”

What do I do wrong? Everything? lol

@Wanderer_eternal: If I remember correctly, when you add the GamePad controls you automatically get touch controls for free when you package your game for Android. I recently went through these tutorials - Introduction to Third Person Blueprint Game Playlist.

Tutorial number 15 Character Blueprint: Gamepad and Touch Controls covers this and shows you how easy it is to do.

You could then use that and modify the graphics that are used by default for these touch controls.

HTH. 8-}

You can lay out the template?