Android onTouch refresh rate

I am using onTouch(View arg0, MotionEvent arg1) as a game input. It returns false so it is not handled. On my HTC HD2 running 4.0.4 this is enough to let the player walk fast enough (e.g. to jump off over obstacles). However my new HTC One S seems to slow in processing it when I only touch, when I swipe the time between two onTouch-Events is much faster. Is there a way to set the refresh rate of the onTouch Listener? Or do you have other solutions for controlling the player?

Answers


You could don't rely on refresh rate, but save time difference (dt) between two updates and calculate speed according to elapsed time.


Need Your Help

How to preSelect an html dropdown list with php?

php select drop-down-menu return option

I am trying to get the option selected using PHP, but I ran out of ideas!

How can I write an algorithm to solve this formula for closest point to a set of lines in 3d

algorithm math geometry

I am trying to understand how I can write an algorithm to solve the formula written at the end of this answer