Log in or register to post comments

gyro android vuforia 2.8.7 and unity 4.3 issues

March 12, 2014 - 11:10am #1

Hi 

I'm facing gyro instability on android devices since upgrading unity3d and vuforia.

I made a sample clean project to demonstrate the issue.

project can be downloaded here
https://dl.dropboxusercontent.com/u/22506069/gyroIssueUnity4.3.2f1-Vuforia2.8.7.zip

It was created and tested with 4.3.2f1 Unity pro version.

here are steps to reproduce
- create empty unity project
- switch to Android and set bundle id in player settings
- add to scene script to print gyro attitude values x,y,z in GUI
- import latest Vuforia unity package from here
https://developer.vuforia.com/resources/sdk/unity
I tested version 2.8.7
- build the app to android phone and rotate with phone in hand in upright position (I tested and saw the issue on HTC One S 4.1.1 and Samsung Galaxy 4 mini 4.2)
- see the gyro.y values are correctly going from aprox 0.7 to -0.7  smoothly around full 360 deg rotation.

- Go again to project and attach script QCARBehaviour  to camera object, let it with default values
- repeat steps above
- see the gyro.y values are incorrectly presented in some parts for me y value goes from somewhere from 0.4 down to -0.2 in just like 5Degree left rotation. Sometimes works better sometimes worse but it is definitely much more unstable.

- just one more curiosity if you let QCARBehaviour script attached to camera but uncheck it to inactivate it, then when you run app some gyro axis are swapped. But this is side issue and I did not investigate this.

Stan.

gyro android vuforia 2.8.7 and unity 4.3 issues

March 25, 2014 - 9:05am #5

Hi David,

I give it few more hours to test all kind of variations and devices. Apart from HTC One S device on android 4.1.1 I cannot reproduce this in any other device. Samsung galaxy mini seems to me a bit more unstable with gyro when QCAR enabled but can't say it is reporting it wrong.

I tested like 4 androids and iPad mini.

I was thinking that HTC device may be faulty but

I tried to calibrate g sensor in settings on htc that did not help.

Also When QCAR is attached gyro reports clearly wrong values but without it it works smooth.

Same project, no other changes just removing QCAR script from camera.

Also I have there installed sphere app

https://play.google.com/store/apps/details?id=com.sphere 

and also unity gyroDroid testing app 

https://play.google.com/store/apps/details?id=com.prefrontalcortex.gyrodroid

which both use gyro I believe and both work very well on this device.

S.

 

gyro android vuforia 2.8.7 and unity 4.3 issues

March 24, 2014 - 12:56pm #4

Excuse the delayed reply - I was at GDC.

Let me look into this.

To confirm, you've observed this on both the HTC One S 4.1.1 and Samsung Galaxy 4 mini 4.2 - have you tested any iOS devices?

gyro android vuforia 2.8.7 and unity 4.3 issues

March 20, 2014 - 6:19am #3

Hi, sorry I somehow missed your answerer.

Yes, I just checked it out. same behaviour on ARcam prefab.

I disabled camera object.

dropped AR prefab.

attached my gyro script

run and same problem happened, gyro going only between 0.5 to 0.2...

then disabled QCARBehaviour

run again on device, gyro axis were swapped.

then removed QCARBEhaviours cript completelly from ARCamera

run again on phone and gyro was nicely showing from 0.7 to -0.7 as it should.

 

We used gyro before and all was fine, I guess this got screwed in 2.8 vuforia upgrade I believe.

But I cannot test it as I don't have older unity vuforia sdk and there is no link to download older versions.

S.

 

gyro android vuforia 2.8.7 and unity 4.3 issues

March 12, 2014 - 12:41pm #2

Are you seeing the same behavior when using our ARCamera prefab, or only with the default Unity main camera?

Log in or register to post comments