Using Accelerometer with Box2D
It would of interest for me (and for sure many others as well) a sample of how to use the accelerometer with Box2D.
What i mean is having a physics world (b2World with gravity, collisions, forces, etc) and on accelerometer update, applying linear/angular impulse, torque/ restitution on coliding objects and so on.
I know its not verry easy and i know it's doable, but i appear to be stuck after i take the values from the accelerometer and have to apply linear impulses on b2bodies. What approach should be used?
Thanks in advance,
Vlad.
|