Dive Board



inconsistent phone rotation

inconsistent phone rotation

by jboss on Jun 30th, 2015 13:52 PM

Hi,

I have two apps for my Dive that I want to combine into one for demo purposes. The problem is that the behaviour when I rotate my phone is not consistent, and because the Dive pushes the volume button on my Sony Xperia Z1 the phone has to be turned around to use the Dive.

App1 is a photo viewer, like a Viewmaster. In this App I use just the DiveCamera with the DiveSensor sript, because there is no need for First Person control. This app works stand-alone with orientation set to auto-rotation, allowed modes landscape-left and landscape-right.
App2 is a photomuseum where the viewer can walk around using a game controller. In this app I have used the Dive FPSPlayer prefab with the DiveFPSController script. This app works stand-alone with orientation set to landscape-left (no auto-rotation, but the display rotates anyway when I turn the phone to have the volume button down).

Now when I combine the two one of them does not rotate anymore.
If I use auto-rotate, landscape left and right the scenes from App1 work fine, but when I start the scene from App2 it does not rotate.
If I use landscape-left (no auto-rotation) the scenes from App 1 no longer rotate, but the scene from App2 does.

I tried to use the FPSPlayer prefab also in the scenes in App1, expecting it would rotate just like App2 with orientation set to landscape-left, but that did not help. The image does not rotate. I also tried building the app without the DiveSensor script, because I don't need to track head rotation, the photo viewer should always be centered in front of the viewer, but that also did not help.

So I don't understand how the scripts handle auto-rotation and how to set the build-setting for orientation correct so that both the DiveCamera and the DiveFPSPlayer rotate the same way. I hope someone can help me.

Thanks.

jboss

Posts: 9

Joined: 08.12.2014

dive-owner


Re: inconsistent phone rotation

by Torben on Jun 30th, 2015 15:24 PM

Hi!

This sounds more like a Unity related problem, but if you send some screenshots/videos/demo apks and debug logs,
I'm sure we'll find a way to help you :)

Torben

Posts: 63

Joined: 26.03.2014

dive-owner


Re: inconsistent phone rotation

by jboss on Jul 3rd, 2015 13:37 PM

I'll post a video as soon as I got my game controller and phone talking to eachother again.... Very frustrating, sorry.

jboss

Posts: 9

Joined: 08.12.2014

dive-owner


Re: inconsistent phone rotation

by jboss on Jul 6th, 2015 10:29 AM

Here's the video showing the behaviour.
https://www.youtube.com/watch?v=x-4mpOf1s2Q

And I also made some screenshots to show the settings. The viewmaster scenes only uses the DiveCamera (screenshot UnitySceneCanada.png), while the Photomuseum scene uses the Dive FPS player (the other two screenshots). When I combined them into one Unity project I also upgraded to the new Dive plugin version (2.1.4), but that gave me duplicate scripts, because the folder structure had been changed. So in the end I used the old (2.0-r500) DiveSensor script, because I knew that worked. The DiveFPSController script I think is from the new package, but I looked at the old and new version and found that there were no differences.

I can upload the Unity project or the apk file, but they are huge because of all the photo's, so let me kow if you really need them.

jboss

Posts: 9

Joined: 08.12.2014

dive-owner


STATISTICS


Total posts: 171733


Total topics: 41609


Total members: 44860


Newest member: Daniel G.