I think I need to ask better question.
Imagine you have gamepad that output the d pad in analog values on axises.
But what you want to have is to have digital values!
What I want to have is when D-pad up is pressed: UP=1, D-pad Left = LEFT=1...
and if pressing on angle, then UP and LEFT = 1 rest 0 so to say.
How can I transform the axises into outputting those binary values?
Develop games in your browser. Powerful, performant & highly capable.
Nevermind I solved myself by reading rawaxis value (Gamepad.RawAxis(0,0) and (0,1)
Flooring the value Floor(Gamepad.RawAxis(0,0))
It will output -1, 0, +1..
Quite binary. Nice.