Its a new input method. Mobile devices have a gyroscope sensor which notices in which direction you rotate the phone.
That way you can for example roll a virtual ball just by slightly turning your phone. A compass should also be possible.
It’s working very well! I put the phone different surfaces and watch was the surface straight and if the numbers are right
My device: Samsung Galaxy S7
It works on all my Android devices and the Chromebook with the “native” Chrome browser.
It does not work however in Android browsers on my Chromebook and also does not work on my Amazon Fire HD8 in Silk. But it could be a limitation of the system or browser.
I guess, as long the browser support it should work, what I would be more interested to see if it works if we wrap it in to an APK. Would you be able to share an APK?
That would be the next step. I haven’t yet managed to get a manual Android export to work on my PC. (But I have to admit that I didn’t spend much time trying) Unfortunately the Build service doesn’t work with a custom version of the new IDE.
Tried the whole evening to get that %&$§$% Cordova working for the Android export but it wants me to accept the Android SDK license which I already accepted.
You have not accepted the license agreements of the following SDK components: Android SDK Platform 26
But I have already accepted all of the licenses via
$ANDROID_HOME/tools/bin/sdkmanager --licenses
Anyone got an idea what could be wrong here?
Not sure what is the problem there, I assume you tried all the solutions you can find online which is basically saying to create the license file using this command.
Some people also reported switching to an older API did solve the problem but as we know, it is no longer an option if you want to target Google Play Store, but remember that there is also the Amazon App Store on Fire OS and some manufacturers also ship their own app store on their Android spin using an older API, so maybe worth trying an older API anyway.
In case it doesn’t work, I would recommend using Visual Studio, it is offer a relatively simple and visual way to build a Cordova app for Android.
You can read the docs here. docs.microsoft.com/en-us/visual … rdova-2017
Basically, you need to create a Cordova project in VS, include your HTML5 app in the www folder, make sure you have cordova referenced in index.html and then go through all the options and build as the doc describe it.
Good news, the Orientation Sensor Extension got merged on Github and should be part of the next release.
You can find an article about its usage on the wiki.
I take it that means it will be supported in the online APK builder too. At least I hope.
I can’t wait to use it. It was one of the features I was waiting for so long to have it in GD.
Same as ddabrahim, I can’t see anything in the Rotation section (Android 7, Firefox), but the other two examples (ball and compass) works fine. By the way, the two examples have bad directions if you switch the phone from portrait to landscape.
The motion around the axes seems to be badly supported on mobile devices. I talked to 4ian and we decided to keep the functionality non the less. I will create a pull request in the coming days. But one can still calculate the relative motion by comparing the current orientation value with the one from the last frame.
@Lizard-13
The orientation sensor only delivers absolute values in relation to the earth, this is why you can make a compass by using the alpha value.
In order to use the orientation sensor you need to design the game either for landscape or portrait.