Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #281 from googlevr/hotspot-rotation-order-fix
Browse files Browse the repository at this point in the history
Fix for rotation order in hotspot renderer:
  • Loading branch information
lincolnfrog authored Nov 28, 2017
2 parents b33bee6 + b5d8268 commit 529214a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/embed/hotspot-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 529214a

Please sign in to comment.