My question is concerning AHUD::ReceiveHitBoxClick(), either in blueprint or in C++ code (same behaviour). Why does it need two touches/taps on hitbox (on device or in mobile preview) to be initiated and fired the first time? After the event fired once, it just works as expected until the touch/tap goes outside the hitbox… The event works perfectly fine with mouse clicks.
I had a look at the AHUD.cpp and the PlayerController.cpp sources and can’t figure out what I’m missing to get it work properly… (it seems that the touch support improve a lot in the 4.2 but this issue remains). Any Idea?
How are you testing this issue? Are you using Mobile Preview in the Editor using UDK Remote with a device?
Are you able to reproduce this issue in a new project from one of the templates? If so, can you provide details about how you set it up so we can reproduce the issue?
I don’t use UDK Remote for testing inputs. Here is my testing configs :
PIE New Editor Window : hit hitbox with mouse → WORKS
PIE Mobile Preview : hit hitbox with mouse (touches emulation) → FAILED
On device launch (iPadMini2) : hit hitbox with fingers → FAILED
I’ve reproduced it easily from a new project (default blank template).
I just setup 3 blueprints (cf attached screenshot) BP_GameMode, BP_PlayerController and BP_HUD.
In BP_PlayerController : set bEnableTouchEvents = true
In BP_HUD : Create an DrawRect and AddHitBox for DrawHUD Event and a Print String if hitbox name match for Receive Hitbox Click Event.
Same behaviour : needs 2 taps (or emulated clicks in Mobile preview) to initiate the hitbox event firing. After that while hits stay contained in the hitbox, works as expected.
Thank you for the clear reproduction instructions. I was able to easily reproduce the exact behavior that you described. I am providing this information to the development team for further investigation.
I noticed that the Hitboxes works with touch events but only the event hit box receive click works n the first touch, the event receive hitbox release works with 2 quick touchs, I thinks the first touch set the cursor position and the second one fires the event when the touch ends. Does Unreal checked on this already?
It wouldn’t be something to do with the Is Focusable settings? I had buttons that did this kind of thing until I unticked the Is Focusable button for that component.