repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 2d05227e7fb25c829b30e5c6c5b9d70fd5407b61:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 2d05227e7fb25c829b30e5c6c5b9d70fd5407b61
Author: James Baicoianu 
Date:   Mon Feb 13 05:00:40 2017 -0800

    Create shoulders for hands

diff --git a/scripts/janusghost.js b/scripts/janusghost.js
index 744111c90ade617be0938e78e284c9f02e0a8d74..
index ..ab2fa15de1ed2b2e8dfc04ca6c4217be141d7713 100644
--- a/scripts/janusghost.js
+++ b/scripts/janusghost.js
@@ -39,6 +39,9 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
     }
     this.createChildren = function() {
       this.head = this.spawn('generic', null, { position: new THREE.Vector3() });
+      this.shoulders = this.spawn('generic', this.properties.player_id + '_shoulders', {
+        'position': [0,1.0,0]
+      });
       this.setHead(this.head_id, this.properties.head_pos);
       this.setBody(this.body_id);
       var name = this.properties.ghost_id;
@@ -265,6 +268,11 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {

     }
     this.updateHands = function(hand0, hand1) {
+      if (!this.shoulders) {
+        this.shoulders = this.spawn('generic', this.properties.player_id + '_shoulders', {
+          'position': [0,1.0,0]
+        });
+      }
       if (!this.hands) {
         this.hands = {
           left: this.shoulders.spawn('leapmotion_hand', this.properties.player_name + '_hand_left'),

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