List of usage examples for android.view MotionEvent AXIS_RY
int AXIS_RY
To view the source code for android.view MotionEvent AXIS_RY.
Click Source Link
From source file:org.gearvrf.controls.Worm.java
public void interactWithDPad() { if (!ScaleWorm.animPlaying) { if (GamepadInput.getCenteredAxis(MotionEvent.AXIS_HAT_X) >= 1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_X) >= 1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_RX) >= 1) { rotateAroundCamera(.1f, -5f); rotateWorm(MovementDirection.Right); }//from w ww. j a v a 2s . c om if (GamepadInput.getCenteredAxis(MotionEvent.AXIS_HAT_X) <= -1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_X) <= -1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_RX) <= -1) { rotateAroundCamera(.1f, 5f); rotateWorm(MovementDirection.Left); } if (GamepadInput.getCenteredAxis(MotionEvent.AXIS_HAT_Y) >= 1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_Y) >= 1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_RY) >= 1) { moveAlongCameraVector(.1f, -.225f); rotateWorm(MovementDirection.Down); } if (GamepadInput.getCenteredAxis(MotionEvent.AXIS_HAT_Y) <= -1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_Y) <= -1 || GamepadInput.getCenteredAxis(MotionEvent.AXIS_RY) <= -1) { moveAlongCameraVector(.1f, .225f); rotateWorm(MovementDirection.Up); } } }