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 #256 from hasandogu/googlevr-master2
Browse files Browse the repository at this point in the history
Change order of rotation to yaw and then pitch
  • Loading branch information
lincolnfrog authored Oct 3, 2017
2 parents 5ea4ba0 + 65f785f commit 4545ce0
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));
quat.setFromEuler(new THREE.Euler(THREE.Math.degToRad(pitch), THREE.Math.degToRad(yaw), 0, 'YXZ'));
hotspot.position.applyQuaternion(quat);
hotspot.lookAt(new THREE.Vector3());

Expand Down

0 comments on commit 4545ce0

Please sign in to comment.