Last active
April 25, 2020 23:41
-
-
Save aheze/de8651439a566053c2214c060c7cfa3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//MARK: Motion (Accelerometer and Gyroscope) | |
/// motionManager will be what we'll use to get device motion | |
var motionManager = CMMotionManager() | |
/// this will be the "device’s true orientation in space" (Source: https://nshipster.com/cmdevicemotion/) | |
var initialAttitude: CMAttitude? | |
/// we'll later read these values to update the highlight's position | |
var motionX = Double(0) /// aka Roll | |
var motionY = Double(0) /// aka Pitch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment