Allowing the user to configure the Accelerometer

Hey team,

Has anyone had any success adding a accelerometer configure button to their app? Is this even possible with Corona?

I know that some applications do support such a feature and it would be awesome to allow us to use it in our games.

I've only just had need of this feature so I will start investigating now and will return with my findings.

Cheers

This is certainly possible to do with Corona, yes :)

I've actually done this before in an game I created, where I allowed the user the "re-calibrate" the accelerometer based on how they were currently holding the device.

What you do is program your app to work with the accelerometer in the "default" standard position, then when you go to re-calibrate, you detect the current xGravity, yGravity (and whatever properties your app takes from the accelerometer specifically), and add/subtract the offsets from your default values.

Hope that helps get you moving in the right direction!

Sweet that's kinda how I envisaged it working, but it's good to know that it definitely does work.

Thanks

views:1393 update:2011/10/19 14:58:09
corona forums © 2003-2011