Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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.