Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Harry_Dodgson
Posts: 153
Registered: ‎10-26-2010
My Device: Bold 9900

PlayBook tilt sensor

Hi,

 

         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.

 

Harry

--------------
Accepted PlayBook Applications: Marmi-doos, BASIC, Run and Hide, SuperClip
Accepted OS4-7 SmartPhone App: KeepLightOn