xr-unity
xr-unity copied to clipboard
Feature:autorotation
objects are stretched/squeezed when switching between portrait and landscape modes
arcore 1.4 android 8.1 unity 2018.1.4f1 8thwall xr 8.1.1.216
8th Wall XR does not currently support autorotation. We suggest selecting the desired orientation just before loading the scene where you would like to run the XR engine, then locking that orientation through the lifetime of that scene.
Are there any updates on official support for this?
Any known hacks for this whatsoever? @mralbean We managed to get it working on iOS but not on Android: https://gist.github.com/mathiassiig/adc574fb3af179526fad4611273d84b9
We currently don't have any updates to offer with official support of autorotation while an AR session is running.
What we suggest to do is detect the device orientation just before loading your AR scene, then lock the orientation for the duration of the AR scene. For example, if your application is set to autorotate, you can do something like this at the time you load your AR scene:
void Run(String scene) {
// Lock orientation to current device orientation prior to loading AR scene
switch (Input.deviceOrientation) {
case DeviceOrientation.Portrait:
Screen.orientation = ScreenOrientation.Portrait;
break;
case DeviceOrientation.PortraitUpsideDown:
Screen.orientation = ScreenOrientation.PortraitUpsideDown;
break;;
case DeviceOrientation.LandscapeLeft:
Screen.orientation = ScreenOrientation.LandscapeLeft;
break;;
case DeviceOrientation.LandscapeRight:
Screen.orientation = ScreenOrientation.LandscapeRight;
break;;
default:
// If Unknown, just set to Portrait
Screen.orientation = ScreenOrientation.Portrait;
break;
}
SceneManager.LoadScene(scene);
}
That's only useful if you're working on an app with partial AR
Any update on this issue? this issue still exists in the 11.2 release.