For an application on a mobile device, I'll need to implement such a fonction.
In the page, there would be a tree and when an action is performed, apples will fall. But I don't want them to fall to the bottom of the screen but to the real ground and that, wathever the rotation angle of the device.
Any hint on how to do that ?
Develop games in your browser. Powerful, performant & highly capable.
Use physics. Use rotation of layout. Put a 'wall' of immovable physics objects around the screen. The touch object can give accelerometer information.
Any exemple ? I must admit I'm a bit stuck.