Is there another way we can utilize the Accelerometer?
Dell7730
Member, PRO Posts: 388
I've created this game that uses it which let you play my game with no touch at all just the tilting, but is there a way we can use that to shake?
Answers
What do you mean shake?
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
it means what it says, shake, lol..... like even when my phone is perfectly leveled, i can move my actor or actors by moving in any direction without tilting it.
I still don't understand what you mean, if you phone is level, how will you tell the actor where to move without tilting / on screen controls?
by shaking the device wouldn't you just be tilting really quick? if so you just flag an attribute in that direction and make the player move
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
ok, imagine you're holding your phone upright facing you, and the actor is at the bottom of your screen, I would like that actor to jump up when I shake my phone up and down, no tilting, lol
Perhaps a timer activated upon movement detection in which, if several directions are detected before the timer expires, it recognizes a shake?
My Blog / App Store / Google Play
I tried that and nothing happens, lol... i guess the accelerometer checks itself for self leveling first before reacting to triggers, if it's not in a flat position, it's not activated, just a guess
If there were a way to calibrate the accelerometer upon app start, perhaps it could be possible. For example, if you hold a phone in a landscape position, the phone will likely be tilted, and that position should be the "level". However, I haven't come up upon a thread yet that someone has successfully calibrated the accelerometer.
My Blog / App Store / Google Play
Back in 2009 I posted about calibrating the accelerometer, it's not too difficult, but you'll have to search to find it, it's from long ago.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
@jonmulcahy , thanks. @dellagarpo , check this out!
My Blog / App Store / Google Play
The accelerometer just returns three values (X,Y,Z) depending on what angle the device is held at, there is no 'check for self levelling' (whatever that might mean).