-
Notifications
You must be signed in to change notification settings - Fork 16
Description
I am using Unity version 5.x and I can't seem to get the accelerometer readings from my Android device. I placed the .jar file in the Assets folder like you said, and used the C# template
(SensorBehaviour.cs) like you said, but I am getting nothing. I am rather new to Unity so I suspect I am missing something obvious and was wondering if you could point me in the right direction.
For the record, I used the AndroidSensorPlugin.jar that you provided a link to, AND I downloaded the Android Studio Project (Unity-Android-Sensor-Plugin-develop) and compiled a new .jar file that I placed in the Assets folder, but neither solution worked.
A little background about the project I'm working on. I made a simple FPS that works fine with the mouse and keyboard. Now I want to replace the mouse with the rotation vector from my Android device, but I am starting small and simply using the accelerometer to make sure I am getting everything working correctly. Once I get the accelerometer working I can replace it with the rotation vector.