Why don't I receive an event from the HitBox on Mobile?

I don’t receive event from the HitBox.

The mobile input touch isn’t taken in account ?

Hey Eddy71,

Thanks for your question! This setup by itself won’t enable your HUD to work 100%, you will need to setup a PlayerController (and Game Mode) that will Enable Click Events, assuming you don’t already have them enabled.

If you download the ContentExamples add-on from the Marketplace, there is a map in that project called Blueprint_HUD that you can look through for examples of how to make a simple pause menu with options. If you have any specific questions about how to implement anything from that example map, just let us know!

If this does not resolve the issue with Hitboxes picking up Touch input on a mobile device, let us know what kind of device you are testing on.

Cheers,

-Steve

Hi Steve,

Thanks for your answer.

Here it is the settings for my GameMode and PlayerController. HitBox events are no more received.

Are this settings ok ??

Your Blueprint_HUD example perfectly works on desktop. But it is not designed for mobile devices usage. For purpose test I just settled true the “Menu Open” variable (because no “M” key) to immediately display buttons. And I launched your example on my iPhone5 and iPad4. When I touch “Resume” and “Quit” buttons, nothing happen. Events are not received ?

Hey Eddy71,

Sorry for the delay in response on this issue–Event Receive Hit Box Click doesn’t register touch events currently. We are looking to add touch input for mobile to this event as well, but we don’t have an ETA for that implementation to be available.

If you would like to see examples of how to have HUD-like menus/input without using a HUD blueprint, check out the main blueprint used in TappyChicken on the Marketplace and look for the Input section.

-Steve

Hi Steve,

I have seen the TappyChicken with components button implementation, but in my case it is not applicable. (Because if the camera move, buttons components move too in the world).

Work around used : With the “Input Touch” event, I compare the touch location with my buttons coordinates.

Now, waiting for future UE release to get a clean HUD.

I’m really disappointed… it took 5 days to discover this post…

To recive click events on hud hitboxes use EnableClick Events bp node


or do it in hud itself via c++

void AInfoHUD::BeginPlay()
{
	// Enable input for the HUD actor. Otherwise Hit Boxes will not work.
	this->EnableInput(PlayerOwner);
	PlayerOwner->bEnableClickEvents = true; // this necessary!

	Super::BeginPlay(); // call parent
}

to process events i used this:


// triggered once hitbox click
void AInfoHUD::NotifyHitBoxClick(FName BoxName)
{

	// Process HitBoxes
	if (BoxName == HitBox_ShowDebug) {
		UE_LOG(LogTemp, Warning, TEXT("[HUD] ShowDebug HitBox Clicked"))
	}

	Super::NotifyHitBoxClick(BoxName); // call parent
}

In Game there is button made via pure hud, which recives clicks.
image
on click looks like this:
image