- Home /
How to make a pedometer in UNITY
I'm currently working on a game that requires the pedometer, for example, the user receives a mission to walk 4000 steps before they can go to the next scene. I have done lots of digging and research and have come up empty. Can anyone help me implement a simple step counter into my game, or show a sample script of how to overcome this problem. p.s. this needs to be done for IOS. Thanks in advance!
Answer by Tona999 · Jun 21, 2017 at 06:33 PM
Set a keyframe on the walking/running animation that triggers a method which adds 1 to a SpepsCount integer. Each time you add to the integer (Each time you call that method) control if that integer is bigger than 4000, if it is the player can move to the next scene.
I don't think you know what I mean, I mean physically walking 4000 steps. How do I detect that?
Your answer
Follow this Question
Related Questions
Invalid PBX project (parsing line 233) 0 Answers
Xcode native calling 0 Answers
Mobile swipes causing player to move different distances randomly 0 Answers
iOS Xcode Archive size is extreme 0 Answers
How to integrate AdMob with iOS? 1 Answer