Skip to main content
edited title
Link
Alex Pi
  • 93
  • 1
  • 11

LiGDX LibGDX: How to make something like vector rotation sensor with accelerometer and compass values?

Source Link
Alex Pi
  • 93
  • 1
  • 11

LiGDX: How to make something like vector rotation sensor with accelerometer and compass values?

So I've tried the vector rotation sensor using the Android API and it works perfectly to do what I want, but LibGDX does not support this sensor. I've been searching and it seems like I can do the same thing as vector rotation sensor using the accelerometer and compass values returned by LibGDX API:

Gdx.input.getAccelerometerX();
Gdx.input.getAccelerometerY();
Gdx.input.getAccelerometerZ();

Gdx.input.getAzimuth();
Gdx.input.getPitch();
Gdx.input.getRoll();

But I couldn't find out how to do this.