2

I would like to detect when a user jumps and the intensity of that jump. I'm coming up short finding good resources for this behavior.

Is there any library which handles this ?

How easy or difficult is it to get accurate data ? (i.e. the difference between a real jump and the user rapidly moving their phone downwards)

Bhavin
  • 27,155
  • 11
  • 55
  • 94
sixstatesaway
  • 1,106
  • 1
  • 12
  • 25

1 Answers1

1

All you would need to do is to read the accelerometer readings. To determine the different between a jump and the user moving the phone you would detect the sudden impact. So you are sampling the rate at which the accelerometer data changes. If it rapidly changes past your threshold you create then it must be a jump and vice versa. Checkout CoreMotion

Here is a tutorial that is outdated but the generally idea is the same.

Detecting a bump (sudden impact)

Community
  • 1
  • 1
Mark McCorkle
  • 9,349
  • 2
  • 32
  • 42