Log in or register to post comments

Nexus 5X ARCamera issue in Unity

January 17, 2017 - 9:37am #1

I'm noticing a problem specifically with the LG Nexus 5X running Vuforia 6-2-6 in Unity 5.5.

It appears that in order to work around the issue with the Nexus 5X camera sensor (in previous Vuforia versions this resulted in the camera image being flipped,) the ARCamera GameObject is being rotated 180 degrees around its Z axis on the Nexus 5X, While this doesn't seem to affect rendering, this means that the camera's "up" axis actually faces what the user sees as down (relative to the camera/device screen.)  

This causes a problem in my case where I need to create a billboard-like effect, where a Text object within a World Canvas should be rotated in such a way that it always faces the physical "up" direction. This can be achieved on every other device by using the up vector of the ARCamera, but because the ARCamera is rotated it means that text appears upside-down on the Nexus 5X.

I verified the issue by debugging Transform.eulerAngles on the ARCamera GameObject, which has a wildly different Z axis value on my device compared to in Play Mode.

On other devices such as the Samsung S5, the issue is not there.

At present my options would be to make a special case for this device in the code (at the risk of there being other devices that also have the same problem) in order to flip my billboarded text, or completely bypass Vuforia and try to read accelerometer/magnometer data to determine how the user is holding the device. Seems a bit overkill considering Vuforia already calculates this to orient the camera image as the phone is tilted.

Does anyone have any suggestions as to how else I might fix this? Are Vuforia aware of the problem?


Nexus 5X ARCamera issue in Unity

January 18, 2017 - 3:37am #3

Thanks dpizzle - just noticed this on the release notes. Good to know it has been documented.

In that case if it's only happening on this device and is likely to be fixed in an update I can just make a special case for the device.

Nexus 5X ARCamera issue in Unity

January 17, 2017 - 4:10pm #2

This is listed under known issues in the release notes, so I assume they are aware and fixing.  This problem popped up a while back and I thought they fixed it, but I could be wrong.  If you happen to have a previous SDK anywhere, I'd give that a shot.  Also you could look in the forum for discussions of when this originally came up.  I think there was some band aid code that helped, but not sure it's still relevant.


Log in or register to post comments