I am trying to make a FPS for android and have controls setup like this
I am using Touch delta for looking and Left stick (which I made using on screen stick script) for moving. Problem is that whenever I move the stick the touch delta is also registered and camera starts rotating.
So if I could restrict the touch delta to say right side of the screen it would work out. But I cant wrap my head around how to do it.
Or any other way through with which I can perform movement with stick and look with the empty space around the stick.
EDIT:
So this is what ended up doing
I made a custom onscreen control where I calculate pointer local position and attached it to a empty UI which is same size as of screen and made sure all other UI are on top of it. And used virtual mouse delta for control path.
Don’t know whether this is the best way to do this but it works.
Maybe it would be better to use custom composite binding with touchscreen.
Also there was a problem when I was setting control path to right stick. It was auto clamping(between -1 to 1) the values which the script was sending.