On Mon, Mar 2, 2009 at 4:21 PM, Mark Murphy <[email protected]> wrote: > > Stoyan Damov wrote: >> http://developer.android.com/reference/android/hardware/SensorManager.html >> >> http://developer.android.com/reference/android/hardware/SensorListener.html > > I'm in much the same boat as the OP. > > While the aforementioned classes (sometimes) tell you if the device > moves, it is not obvious how to translate those values into real-world > specific motions. > > For example, if you watch the various iPhone commercials, you will see: > > -- a "shake" for dice rolling > -- "steering" effects for driving simulators and games > > Having the low-level accelerometer values are all well and good, but for > those of us without physics degrees (or, um, those of us *with* physics > degrees but who, er, have forgotten most of it), it would be nice to > have some wrapper classes that work on human-scale events, like shaking, > steering, flipping, spinning, etc.
I know shit about converting the raw X, Y, Z data into shake, steering, etc. For my game, I needed to handle tilt/roll only - I peeked at Lunar Lander (the Tilt edition)'s source code, and experimented a few minutes for another, different kind of tilt I needed in case the user gets stuck. The point is - experiment. Knowing the Pythagorean theorem helps but experimenting is quite as useful. Cheers > > I was hoping to write some of these myself, and I may still figure it > out, but the raw data is somewhat mystifying. > > If anyone knows of open source projects that have done a nice job with > their accelerometer use, chime in! > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > Android Training in Sweden -- http://www.sotrium.com/training.php > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

