Hello Guys, I am so lost and hope to seek for help! Basically i want to make a Android game to allow user perform workouts such as squats, sit up and so on. I want to make the game in such a way that when doing squats (or sit-ups, push up), it counts the number of squats by using accelerometer sensor . So is there any idea or guide on how to start off this project?
You could start by checking the linear acceleration of the mobile device. To get this, its either Input.userAcceleration
or Input.Accelerometer.userAcceleration
. Im not sure which one, but you can find it on the docs.
Then, if there is a spike in the acceleration, the phone has either dropped/risen etc. You can measure if there is a spike by measuring the change between the last value every update.
Count two spikes per squat/push up. One for pushing down, one for back up. Hope that helps. @wlsiow96