From b5d8268132685b54de263029249662748f2d5e7d Mon Sep 17 00:00:00 2001 From: Max Rebuschatis Date: Tue, 28 Nov 2017 12:37:16 -0800 Subject: [PATCH] Fix for rotation order in hotspot renderer: https://github.com/googlevr/vrview/issues/107 --- src/embed/hotspot-renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/embed/hotspot-renderer.js b/src/embed/hotspot-renderer.js index 3c363402..6e8cb140 100644 --- a/src/embed/hotspot-renderer.js +++ b/src/embed/hotspot-renderer.js @@ -105,7 +105,7 @@ HotspotRenderer.prototype.add = function(pitch, yaw, radius, distance, id) { // Position the hotspot based on the pitch and yaw specified. var quat = new THREE.Quaternion(); - quat.setFromEuler(new THREE.Euler(THREE.Math.degToRad(pitch), THREE.Math.degToRad(yaw), 0, 'YXZ')); + quat.setFromEuler(new THREE.Euler(THREE.Math.degToRad(pitch), THREE.Math.degToRad(yaw), 0, 'ZYX')); hotspot.position.applyQuaternion(quat); hotspot.lookAt(new THREE.Vector3());