Device orientation checker (HTML5)

Good evening,


Here is a link to a project which is added the detection of direction. This allows for HTML5 games prevent the player of poor camera orientation.

Just add the source of your project and the script orientation_checker.js and the javascript event in your scene.

A global variable is created automatically: “orientation_error”. In case of wrong orientation, it will have the numerical value 1, otherwise 0 (no error). This variable can be tested in an event in your scene if needed.