5
\$\begingroup\$

Does anyone know of a good WP7 accelerometer sample of a ball rolling around on a screen?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

Sort of what you want, been a while since I've used samples like this but it should work. http://faculty.washington.edu/ksung/pub/WP7/3.Accelerometer/Accelerometer.html

Just googled "wp7 accelerometer sample". I'de avoid copying the source though. Look more at what you logically want to do and look specifically at the API documentation for XNA to accomplish it. If you want to roll a ball, look up how to add torque to rigidbodies in XNA, then how to get the x and y values from the accelerometer. Apply those to the torque and there ya go!

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .