mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
tweaks
This commit is contained in:
parent
6b468ee87b
commit
82f178a353
1 changed files with 9 additions and 25 deletions
|
@ -38,24 +38,14 @@
|
||||||
rightHand: false,
|
rightHand: false,
|
||||||
handIsSet: false,
|
handIsSet: false,
|
||||||
setLeftHand: function () {
|
setLeftHand: function () {
|
||||||
if (this.handIsSet === false) {
|
|
||||||
this.leftHand = true;
|
|
||||||
this.rightHand = false;
|
|
||||||
this.setHand = 'left';
|
|
||||||
this.handIsSet = true;
|
|
||||||
} else {
|
|
||||||
this.currentHand = 'left'
|
this.currentHand = 'left'
|
||||||
}
|
|
||||||
},
|
},
|
||||||
setRightHand: function () {
|
setRightHand: function () {
|
||||||
if (this.handIsSet === false) {
|
|
||||||
this.rightHand = true;
|
|
||||||
this.leftHand = false;
|
|
||||||
this.setHand = 'right';
|
|
||||||
this.handIsSet = true;
|
|
||||||
} else {
|
|
||||||
this.currentHand = 'right'
|
this.currentHand = 'right'
|
||||||
}
|
|
||||||
},
|
},
|
||||||
startNearGrab: function () {
|
startNearGrab: function () {
|
||||||
if (this.isGrabbed === false) {
|
if (this.isGrabbed === false) {
|
||||||
|
@ -70,18 +60,17 @@
|
||||||
volume: 0.1
|
volume: 0.1
|
||||||
});
|
});
|
||||||
this.isGrabbed = true;
|
this.isGrabbed = true;
|
||||||
|
this.initialHand = this.hand;
|
||||||
|
print('INITIAL HAND:::' +this.initialHand)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
continueNearGrab: function () {
|
continueNearGrab: function () {
|
||||||
if (this.setHand === this.currentHand) {
|
|
||||||
print('CONTINUING GRAB IN HAND')
|
print('CONTINUING GRAB IN HAND')
|
||||||
var position = Entities.getEntityProperties(this.entityID, "position").position;
|
var position = Entities.getEntityProperties(this.entityID, "position").position;
|
||||||
this.audioInjector.options.position = position;
|
this.audioInjector.options.position = position;
|
||||||
}else{
|
|
||||||
print('NOT SAME HAND GRABBING')
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
releaseGrab: function () {
|
releaseGrab: function () {
|
||||||
|
@ -92,12 +81,7 @@
|
||||||
});
|
});
|
||||||
this.isGrabbed = false;
|
this.isGrabbed = false;
|
||||||
}
|
}
|
||||||
if(this.setHand===this.currentHand){
|
|
||||||
print('SAME HAND LET GO')
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
print('DIFFERENT HAND KEEP HOLDING')
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue