mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +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,
|
||||
handIsSet: false,
|
||||
setLeftHand: function () {
|
||||
if (this.handIsSet === false) {
|
||||
this.leftHand = true;
|
||||
this.rightHand = false;
|
||||
this.setHand = 'left';
|
||||
this.handIsSet = true;
|
||||
} else {
|
||||
|
||||
this.currentHand = 'left'
|
||||
}
|
||||
|
||||
},
|
||||
setRightHand: function () {
|
||||
if (this.handIsSet === false) {
|
||||
this.rightHand = true;
|
||||
this.leftHand = false;
|
||||
this.setHand = 'right';
|
||||
this.handIsSet = true;
|
||||
} else {
|
||||
|
||||
this.currentHand = 'right'
|
||||
}
|
||||
|
||||
},
|
||||
startNearGrab: function () {
|
||||
if (this.isGrabbed === false) {
|
||||
|
@ -70,18 +60,17 @@
|
|||
volume: 0.1
|
||||
});
|
||||
this.isGrabbed = true;
|
||||
this.initialHand = this.hand;
|
||||
print('INITIAL HAND:::' +this.initialHand)
|
||||
}
|
||||
|
||||
},
|
||||
continueNearGrab: function () {
|
||||
if (this.setHand === this.currentHand) {
|
||||
|
||||
print('CONTINUING GRAB IN HAND')
|
||||
var position = Entities.getEntityProperties(this.entityID, "position").position;
|
||||
this.audioInjector.options.position = position;
|
||||
}else{
|
||||
print('NOT SAME HAND GRABBING')
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
releaseGrab: function () {
|
||||
|
@ -92,12 +81,7 @@
|
|||
});
|
||||
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