repo: janusweb
action: commit
revision: 
path_from: 
revision_from: b7d90d3bb8cf1f9770d60ecc5e60d36039b4a10e:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit b7d90d3bb8cf1f9770d60ecc5e60d36039b4a10e
Author: James Baicoianu 
Date:   Mon Feb 17 17:27:43 2020 -0800

    Fix backwards remote player heads

diff --git a/scripts/janusghost.js b/scripts/janusghost.js
index 97f9b0f0b608b3468368d9453685f33cda43e778..
index ..2911a9d840a46b24309618ce7b2e84d84a950a03 100644
--- a/scripts/janusghost.js
+++ b/scripts/janusghost.js
@@ -169,7 +169,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
             id: headid,
             pos: headpos.clone().negate(),
             //orientation: new THREE.Quaternion().setFromEuler(new THREE.Euler(0, Math.PI, 0)),
-            rotation: V(0, 180, 0),
+            //rotation: V(0, 180, 0),
             lighting: this.lighting,
             //cull_face: 'none'
           });
diff --git a/scripts/multiplayermanager.js b/scripts/multiplayermanager.js
index e3ba7bc0f80eba1e755024c5ce2a5de65ca31def..
index ..b47821c985ca6cf8f364991014e61d1ced89edde 100644
--- a/scripts/multiplayermanager.js
+++ b/scripts/multiplayermanager.js
@@ -183,13 +183,14 @@ console.log('[MultiplayerManager] set active room:', room, this.activeroom);
           //this.tmpMat.makeRotationFromQuaternion(head.properties.orientation);
           tmpMat.copy(head.objects['3d'].matrixWorld);
           tmpMat.extractBasis(tmpVecX, tmpVecY, tmpVecZ);
-          ret.view_dir = (-tmpVecZ.x) + ' ' + (-tmpVecZ.y) + ' ' + (-tmpVecZ.z),
+          ret.view_dir = tmpVecZ.x + ' ' + tmpVecZ.y + ' ' + tmpVecZ.z,

           ret.up_dir = tmpVecY.toArray().join(' ');
-          var headpos = head.properties.position.clone();//.sub(new THREE.Vector3(0,1.3,0));
-          headpos.x *= -1;
-          headpos.z *= -1;
-          ret.head_pos = headpos.toArray().join(' '); //this.tmpMat.getPosition().toArray().join(' ');
+          var headpos = head.properties.position;
+          //headpos.x *= -1;
+          //headpos.z *= -1;
+          //ret.head_pos = headpos.toArray().join(' '); //this.tmpMat.getPosition().toArray().join(' ');
+          ret.head_pos = [headpos.x, headpos.y, headpos.z];
         } else {
           ret.view_dir = '0 0 1';
           ret.head_pos = '0 0 0';
@@ -226,7 +227,7 @@ console.log('[MultiplayerManager] set active room:', room, this.activeroom);

       //console.log('[MultiplayerManager] player update', moveData);
       if (this.avatarNeedsUpdate || player.avatarNeedsUpdate) {
-        moveData.avatar = player.getAvatarData().replace(/"/g, "^");
+        moveData.avatar = player.getCurrentAvatarData().replace(/"/g, "^");
         this.avatarNeedsUpdate = false
         player.avatarNeedsUpdate = false
       } else if (moveData.avatar) {

-----END OF PAGE-----