Well I’ve got it to do something, but the objects with rigid bodies are having an epic panic attack. Does anyone understand the gyroscope and what it’s doing exactly?
// Called on every frame. Handles touch data and rotates Cube.
void Update()
{
int fingerCount = 0;
Vector3 CurrentFingerPos;
Vector3 newGrav, currentGrav;
Quaternion gyroRot;
Input.gyro.enabled = true;
//transform.rotation = Input.gyro.attitude
currentGrav = Physics.gravity;
gyroRot = Input.gyro.attitude;
newGrav = gyroRot.eulerAngles + currentGrav;
Physics.gravity = newGrav;
Normally the gyroscope is supposed to set the 0.0 of it’s quaternion when it’s enabled, by disabling then re-enabling you can re-calibrate the gyroscope’s default. This is a bug and is not working. So calibration of the gyroscope is done before you’re able to set ‘enable’ to true. So change your results according to testing as gyro’s results are absolute right now
Asides that returning the value of attitude is giving me some interesting results… Here’s what it actually does:
Input.gyro.attitude = [as a quaternion] (X = left/right axis… Right being the positive… Y = Up/Down axis, from default position anti-clockwise looking from the left is the positive…, Z = Upside down… Yeah that’s right. In default position both this and W will be at about -0.9… Only by turning the device upside down exactly do those two floats hit zero).
Hope that helps anyone else out there. Still figuring out how to use that data… but atleast I have some info on their effects now.