04-26-2014 12:00 PM
I am starting with the FallingBlocks demo program and trying to make it move a block around the screen based on the tilt of the tablet. It seems everything I do in the handleSensorEvent() routine just makes it worse. Ideally, I would like the blocks to stop moving when the tablet is near level and move in the direction of tilt at a controllable speed for a game. I have also tried to set an offset so the game could be played without having to be flat, but that hasn't been working for me either. Most changes that I have tried make the back/forth unresponsive and left/right moves the block at an angle instead of just horizontally.
Any help would be appreciated as always.