Forum Discussion
Gnimmel
7 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 gre...
stregillus
7 years agoExplorer
I've made a pretty big breakthrough! I was looking at the code that is actually returned by OVRDisplay.acceleration, and it looked like this:
@Gnimmel, I'm fairly certain that you're using my VR-Step plugin (I am the dev of that), feel free to PM me on here, and I can help you adapt the code for the Go. The values are still a bit higher than they were on GoogleVR, even after dividing by 9.8, so some other things need to be tweaked. I'll also probably update the plugin now that I know what's going on.
public Vector3 acceleration
{
get {
if (!OVRManager.isHmdPresent) {
return Vector3.zero;
}
return OVRPlugin.GetNodeAcceleration(OVRPlugin.Node.None, OVRPlugin.Step.Render).FromFlippedZVector3f();
}
}Note the "Node.None" there! I changed it to Node.Head, so now it looks like this:public Vector3 acceleration
{
get {
if (!OVRManager.isHmdPresent) {
return Vector3.zero;
}
return OVRPlugin.GetNodeAcceleration(OVRPlugin.Node.Head, OVRPlugin.Step.Render).FromFlippedZVector3f();
}
}Now I'm getting the values I want! It looks like these units are in Meters/Second squared. In my case, my code was originally programmed to assume Gs, so I just divided that number by 9.8, and I'm getting the values that I seem to want.@Gnimmel, I'm fairly certain that you're using my VR-Step plugin (I am the dev of that), feel free to PM me on here, and I can help you adapt the code for the Go. The values are still a bit higher than they were on GoogleVR, even after dividing by 9.8, so some other things need to be tweaked. I'll also probably update the plugin now that I know what's going on.
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
- 12 years ago
- 10 months ago
- 4 years ago
- 3 years ago
- 2 months ago