Forum Discussion
Gnimmel
8 years agoExplorer
Can't get the accelerometer to work on Oculus Go, but works fine on Gear VR?
I have a game on the store called Jogger which uses the accelerometer to detect for when someone is jogging on the spot to move forward.
This has been on the store for over a year now and works great, however it's not working on the Oculus Go.
Is there a different way to access the gyro on the Oculus Go?
For the Gear VR I can use "Input.gyro.userAcceleration" but this just returns 0 0 0 on the Go?
Any help would be greatly appreciated at this point because I've had to remove Jogger from the Go store until I can find out why it's not working.
22 Replies
Replies have been turned off for this discussion
- stregillusExplorerI also need this functionality. Without access to the gyro/accelerometer, we can't do anything interesting with head gestures, interesting input methods (like walking-in-place), etc. I was hoping to port my Daydream/Cardboard game to the Go, which uses walking-in-place input, but if there's no way to access this I guess my interest in developing for the Go has dropped significantly.
I've also tried using OVRDisplay.acceleration, but that also doesn't seem to give any values. - GnimmelExplorerThanks for the update, I look forward to hearing what you can find out about this problem.
- stregillusExplorerHi @imperativity
Thanks for the response. Just out of curiosity, does that mean that on GearVR, Input.gyro returns the phone's sensor data, not the GearVR headset's? I always suspected that that was the case, but it was a bit hard to verify.
I'm guessing that getting the sensor data using the linked VrApi would required a custom/modified Android activity to pass that data into Unity, correct? Or is there a way to do this another way? - GnimmelExplorer
@imperativity Thanks for the update.
I was trying to find information on the VR API and couldn't find anything for Unity. Do you know of any, or is this something that will need a plug-in as @stregillus asked?
- carrotstienProtegeHello, we want to do something in our app that requires us to be able to access the imu data per frame, or faster if possible.
Even if the limit is just getting it once per frame through the sdk, we expect to be able to get
for gearVR: HEAD:[2 accelerations, 1 from phone, and 1 from gearvr], Controller [1 acceleration]
for Oculus Go, same as above, but only 1 acceleration from the head.
Please let us know when /if this can be done. If it can't be done, that's a big wrench in our plans.
@imperativity - sara_hanson_123ExplorerHey y'all,
I managed to get a reading with adb logcat on the angular acceleration by instantiating an OVRDisplay:
OVRDisplay display = new OVRDisplay();
float temp = display.angularAcceleration.y;
Debug.Log(temp);
For acceleration just change temp, like so:
float temp = display.acceleration.y;
Otherwise, my question is about the angular acceleration/acceleration scale, and I thought everyone here may find the question useful as well: what are the units for these readings? @imperativity
Best of luck. - stregillusExplorer@"sara.hanson.12382" I guess Angular Acceleration likely works fine if that's all you care about. However, I doubt it would work great with walking in place, since most people don't do a ton of head rotation when they walk. I was more interested in just normal acceleration, and unfortunately display.Acceleration just returns 0 all the time.
- carrotstienProtegeThere is something like this, but I'd reeeally prefer if Oculus SDK just made it available.
https://hackernoon.com/how-i-hacked-google-daydream-controller-c4619ef318e4 - sara_hanson_123Explorer@stregillus I can get readings for acceleration in that same way as well. I just changed angularAcceleration to acceleration and it worked.
- carrotstienProtege@"sara.hanson.12382", is this on GearVR or GO? Can you post a snippet of that code?
and any luck getting acceleration for the controller?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 13 years ago
- 8 months ago
- 5 years ago
- 3 years ago
- 7 years ago