Gyroscope on HTC WP8X

Hi,

I’m trying to figure out whether this smartphone has a gyroscope or not.
The specs site from HTC says “yes” but Unity3D says with “SystemInfo.supportsGyroscope” “no”.

Does anyone know something about this?

Here’s the link to the HTC Website

I’ve never tried to use the gyroscope on a mobile device myself, but I helped someone on UA research it some time ago. There’s something about Input.gyro only working on iOS; look here, where it is mentioned in the comments.

The post in the link above is quite old, and I have no idea why Unity still wouldn’t appear to support it on Android even when the device specifications mention a gyroscope, but I know I’ve seen other posts about it on here quite recently, such as this one here, tested with a Nexus 7.

Sorry I can’t provide a solid easy solution to this. I simply think this is something Unity has yet to fully support on Android.

I don’t know about Windows Phone, but SystemInfo.supportsGyroscope is definitely supported on Android as well as iOS (just tested under Android 4.1.2 on a Sony Xperia S and Android 4.3 on a Nexus 10).

Do you actually get any readings from the Input.gyro class itself? (i.e. the “attitude” values)

Funny things happened:

I made a new project including only the follwing script:

#pragma strict
var gyro : Gyroscope;

function Start(){
   gyro = Input.gyro;
   gyro.enabled = true;
}

function OnGUI(){
   GUI.Button(Rect(0,000,500,50),"1: " + Input.gyro + "");
   GUI.Button(Rect(0,050,500,50),"2: " + gyro.enabled + "");
   GUI.Button(Rect(0,100,500,50),"3: " + Input.gyro.gravity.y + "");
}

When I press “play” in the editor I see the following (as aspected):

When I deploy on the HTC phone I see the following: