Download

How do you make the buttons for android? With Widgets?

Hello,

From what i know widget isn’t a good option since my buttons are circles and not squares.

What i want is a button (Not joystick), but i don’t know from where i start, (I desactive the default joystick of UE4).

I’m not sure if it’s through widget or any other way. Some people says it’s widget, but mine are not squares (When you create the button, it’s a transparent square)

2.- Although not related to the question but, does the OnClicked event of a button of a widget can be used for a mobile? I mean is OnClicked the same as touch button for a mobile? Sorry for my bad english…

Please, can someone tell me? Thanks for the answer.

You can set a circular image on the widget with a transparent background. The hitbox of the button will still be square but it will show as circular on the interface.

I can’t find a way to activate the button because every information is on my character, i know i can use game instance, but what i mean in the widget, you have the OnClicked button but how do i activate something that is on my character? (That something is an attack ability).

Anyone has a idea? It’s not like in the computer where you already have the Input keyboard.

In OnClicked event you can “Get Owning Player Pawn” then Cast that to your player pawn Class and then call whatever functions are in your pawn.

Thanks for the answer.