diff --git a/aframe/src/location-based/gps-camera.js b/aframe/src/location-based/gps-camera.js index 64fd1e24..60e9f4a1 100644 --- a/aframe/src/location-based/gps-camera.js +++ b/aframe/src/location-based/gps-camera.js @@ -34,7 +34,7 @@ AFRAME.registerComponent('gps-camera', { default: 0, } }, - update: function() { + update: function () { if (this.data.simulateLatitude !== 0 && this.data.simulateLongitude !== 0) { localPosition = Object.assign({}, this.currentCoords || {}); localPosition.longitude = this.data.simulateLongitude; @@ -334,7 +334,7 @@ AFRAME.registerComponent('gps-camera', { _onDeviceOrientation: function (event) { if (event.webkitCompassHeading !== undefined) { if (event.webkitCompassAccuracy < 50) { - this.heading = event.webkitCompassHeading; + this.heading = event.webkitCompassHeading + window.orientation; } else { console.warn('webkitCompassAccuracy is event.webkitCompassAccuracy'); }