Limiting joystick to up down left right
Hello everyone,
Using the Joystick in the iOS, I saw there is an action for Joystick Mask, but I can't figure it out and get it to work. From my understanding it would limit the directions of the controler to up down left right for example. But how do I do it?
From the help file:
This action allows you to mask the input of the joystick. You have to provide a binary mask used to calculate a logical AND between the joystick input and the mask. The inputs are coded as following :
%000001 : top
%000010 : bottom
%000100 : left
%001000 : right
%010000 : fire 1
%100000 : fire 2
For example, a mask of 3 (%11) will only allow up and down movements...
I don't get what it means mask of 3, or how would you write it in the expression editor, because everything I have tried at least, has failed.
Thanks in advance.
Renato