Download

Virtual Joystick + Touch event problem (mobile)

Hi, I have some problems when trying to use touch event and virtual joystick at the same time.
In my game, the player can zoom in and out by pinching (with 2 fingers obviously), pan the camera by swiping and of course, moving with the virtual joystick.
My problem is that using virtual joystick is considered as a touch event, so if the player try to pan the camera while using the joystick, the game act as if it was a double touch event and zoom in/out So, is it possible to exclude the virtual joystick from those touch events?

I think the solution would be to ignore the x,y area of the joysticks in my blueprint logic but I don’t know how

I still need help with this.

To calculate which side of the screen you are touching, in your blueprint you get player controller. From that node you drag and type-get viewport size. You drag from X pin of get viewport size and divide it by two. Now this number is the middle of your phones screen. Anything less is left side where the stick is, anything more is… you know where I am going with this.

Now from get player controller node drag a pin and get-get input touch state node. Here you will get the X coordinate that you can compare to a number we got above. I hope you can work something out from here. Good luck!

Thank you! Been trying to disable the left side of my screen for ages. You are a lifesaver.