Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GearVR TouchPad MotionEvent.AXIS always start in center. #231

Closed
DanielNogueiraAndroid opened this issue Aug 25, 2015 · 2 comments
Closed

Comments

@DanielNogueiraAndroid
Copy link

I'm having a hard time getting the absolute touch position on GearVR TouchPad, the value of X and Y always start with 0 even if I'm not touching on the center of touch pad.
To get position x and y, I'm using :

public class MainActivity extends GVRActivity{
...
    @Override
    public boolean onTouchEvent(MotionEvent event) {
         float x = event.getAxisValue(MotionEvent.AXIS_X);
         float y = event.getAxisValue(MotionEvent.AXIS_Y);
        return super.onTouchEvent(event);
    }
 ...   
}
@thomasflynn
Copy link

That is how the touchpad works on the GearVR works. No matter where you touch down on the pad, it reports the initial position as 0 and then gives relative coordinates from there. It's configured that way in the firmware of the touchpad. The touchpad is really only good for taps and swipes.

@mteofilo
Copy link

Thank you for the clarification. We'll represent just tap, long press, and swipes in Controls sample. This issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants