Questions tagged [accelerometer]

An accelerometer is a sensor, usually embedded in smartphones, that detects the orientation of the device. Accelerometers are commonly used in racing and flying games as a primary input source.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
559 views

Moving sprite using the accelerometer in LibGDX?

I don't know how to use accelerometer in LibGDX; how could I use the the motion sensor? I'm working for a top down game with the motion sensor. I'm new to this framework. My sprite image is already ...
3
votes
1answer
2k views

In Unity on Android, how can I rotate an object with the accelerometer?

I'm making a game where you control a platform with balls falling on it, and you have to balance the balls and prevent them from falling off. I'm currently using a mouse to control it with this code: ...
1
vote
1answer
131 views

Accelerometer input for flying game

I'm trying to create an infinite flying game where the gameobject (a plane) keeps moving forward and at a particular height throughout the game. I want to be able to roll and pitch the plane but not ...
0
votes
0answers
29 views

Integrating accelerometer data samples to get velocity and displacement

I am working on an android app built in Unity that would allow the users to track their movements by just using the data coming from the device sensors. I have read about similar issues already and I ...
0
votes
1answer
58 views

Why the value of float xAxis = -Gdx.input.getAccelerometerY(); is given a accelerometer of y axis?

I am learning game development from the udacity course "https://classroom.udacity.com/courses/ud405/lessons/5389263706/concepts/53853441090923" I am stuck with one statement in the code about ...