KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using the accelerometer to move something around in X/Y on the screen. This is easy if the phone starts flat on the table. I've come up with something in an attempt to be able to start at any given position, and work from there. But it doesn't seem to work naturally. How do I calibrate things so I can get the difference in orientation from the starting point? cursorX -= accelerometerCalibrationY - getAccelerometerY(); cursorY += accelerometerCalibrationX - getAccelerometerX(); This works fine for flat on the table, and SOME starting positions. The variables are just getAccelerometerXY at the start.
Tags (comma-separated)
Save Edits
Cancel