Search code examples
iosiphoneaccelerometercore-motion

What is the .Z for acceleration on an iPhone?


I am using Core Motion on my app. I know that the .X is moving the iPhone along the long axis and the .Y is moving the iPhone across the short axis. But I do not know what the .Z is reading, so if anyone could explain that to me it would be great.


Solution

  • The Z axis is what you'd be using if you smashed the screen of the iPhone into your forehead.

    By the way, this statement is not quite right: "I know that the .X is moving the iPhone along the long axis". Core Motion cannot detect moving (despite the name). It detects acceleration, which is not quite the same thing. You can move without accelerating (also known as constant velocity), and you can accelerate without moving (also known as gravity).