immersive-web/webvr-polyfill

VRDisplay.resetPose() has no effect

naftalibeder opened this issue · 2 comments

In the VRControls object I'm using, the function resetPose() calls vrDisplay.resetPose() from the polyfill.

It executes this chain:

VRDisplay.prototype.resetPose = function () {
  deprecateWarning('VRDisplay.prototype.resetPose');
  return this._resetPose();
};

CardboardVRDisplay.prototype._resetPose = function () {
  if (this.poseSensor_.resetPose) {  // returns undefined
    this.poseSensor_.resetPose();
  }
};

However, this.poseSensor_ does not define resetPose(), so I'm not sure what the intention was.

Is there a new way to zero the camera control rotation? A previous version of the polyfill (I don't remember which) handled this correctly.


webvr-polyfill version: 0.10.6
Browser name/version/release channel: React Native (0.55.4) WebView
Operating System: Android 8.0.0

The new pose sensor uses Generic Sensors, added in Chrome 63 -- reset pose was not implemented in that pose sensor due to resetPose being deprecated in the WebVR 1.1 spec. I'm willing to discuss use cases/PRs implementing this within cardboard-vr-display, but this seems better handled in user content, and not by the polyfill

This makes sense, thanks for pointing this out! I've implemented view recentering natively and it's working fine.