- Home /
Best Way to make Swipe to Look function via touch. (Android)
Hello developers,
I want to make a swipe to look controller which can be used in a FPS style game on android or iOS devices. (like in the famous titles like Dead Trigger, Blitz Brigade, etc).
Actually I made a controller which is working properly on my tablet (Sony Xperia Tab Z). The problem comes when I want to use this on a smaller screen device, like a phone.
These problems occurs:
When the player touches the screen at the first time to look around, the first finger movement is not recorded, so when the player moves his finger, the crosshair will jump to the next position instead of following the finger, this happens only with the first finger movement, after that this is fine. (I fixed this by leaving the first delta, but if there is a better way to do this, I'd like to hear).
The swipe-look is jittery, it is not smooth. I could use lerp or slerp but then it will be hard to aim (as it becomes inaccurate cause of the smoothing) and it becomes uncomfortable to use.
What is the best way to make this work? I like the way it works in Dead Trigger for example. Smooth, accurate, and comfortable.
Thank you!