Reopening the gyro topic

I have read many different topics on how to access the gyroscope on the Siri remote. Many point out that accessing it via the GameController library returns 0,0,0 values (which is true). Some point out that in the header files it is noted that the data isn't useful.


I just want to point out that Shadowmatic obviously uses gyro data. As you tilt the Siri controller while playing that game, the scene changes. So obviously there is a way to get to the gyro data. Has anyone else had any luck with this yet?


Thanks!

Not using the gyro. But, using the accelerometer you can determine tilt.


Check out motion.gravity

No gyro data, but I'm using both motion.gravity and motion.userAcceleration in my pool game.


motion.gravity - use the rotation for looking around ( x axis) , zooming in and out ( y axis) and also to angle the cue up and down for jump shots etc.

motion.userAcceleration - for using the remote like a pool cue to take each shot.


I have a feeling it might be more accurate if we had access to the gyro data, but you can do a lot with what's already there.


search for "Cueist demo" on youtube and you can see the smoothed accelerometer movement.

Good to hear about Gyros again 🙂 my app really need Gyros data (for the moment I'm using tilt...).

None of the games I try are using appearently gyroscope data. Acceleration and gravity (very ingenious use in some cases) data are used in all of them.


Appearently new Xcode beta 7.2 has the same use about the gyros. I think that for the moment there are no gyos data...


I also write to Apple bug report (to ask for a new feature) about the gyros and they answer me that this bug still been reported yet. They know about this limitation, but without reponse for the moment.

Accepted Answer

This is part of code from tvOS version of Shadowmatic related to Gyro...

- (void)controllerDidConnect:(NSNotification *)notification
{
    GCController* gcController = notification.object;
    GCMotion* gcMotion = [ gcController motion ];
    gcMotion.valueChangedHandler = ^(GCMotion *motion)
    {
          gravity = Vec3( motion.gravity.y, -motion.gravity.x, motion.gravity.z );
          //NSLog(@"%@", gcMotion );
    };
//....

}

then I'm doing some "lowpass" filtering.
hope this helps..)

It does help! Thanks Bagrat! And congrats on your success!

Thank you Streamside7 🙂
Glad to be helpful.

It looks great Bagrat. But, it is good to get YAW data ? ℹ

Reopening the gyro topic
 
 
Q