Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

Sort of what you want, been a while since I've used samples like this but it should work.

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!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.