Now I am using iOS 16 beta 6, I can get buttonA/buttonB is pressed event. but cannot get accelerator motion data info.
//work
buttonA?.valueChangedHandler = {(_ button: GCControllerButtonInput, _ value: Float, _ pressed: Bool) -> Void in
print(">>> ButtonA tapped")
}
//work
buttonB?.valueChangedHandler = {(_ button: GCControllerButtonInput, _ value: Float, _ pressed: Bool) -> Void in
print(">>> ButtonB tapped")
}
// this is not works
gameController.motion?.valueChangedHandler = { (motion: GCMotion)->() in
print(">>>> motion data \(motion.acceleration.x) \(motion.acceleration.y) \(motion.acceleration.z)")
if let delegate = self.motionDelegate {
delegate.motionUpdate(motion: motion)
}
}
Is there any plan to support this?