mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
use new thingo
This commit is contained in:
parent
52edc3b701
commit
2add609387
2 changed files with 18 additions and 4 deletions
|
@ -1216,6 +1216,7 @@ Controller.enableMapping(MAPPING_NAME);
|
|||
var handToDisable = 'none';
|
||||
|
||||
function update() {
|
||||
// print('disabled in update:::'+handToDisable)
|
||||
if (handToDisable !== 0) {
|
||||
leftController.update();
|
||||
}
|
||||
|
|
|
@ -78,6 +78,11 @@
|
|||
|
||||
var USE_DEBOUNCE = false;
|
||||
|
||||
var TRIGGER_CONTROLS = [
|
||||
Controller.Standard.LT,
|
||||
Controller.Standard.RT,
|
||||
];
|
||||
|
||||
function interval() {
|
||||
var lastTime = new Date().getTime();
|
||||
|
||||
|
@ -144,6 +149,8 @@
|
|||
},
|
||||
|
||||
startNearGrab: function() {
|
||||
|
||||
print('START BOW GRAB')
|
||||
if (this.isGrabbed === true) {
|
||||
return false;
|
||||
}
|
||||
|
@ -226,6 +233,7 @@
|
|||
},
|
||||
|
||||
createArrow: function() {
|
||||
print('create arrow')
|
||||
this.playArrowNotchSound();
|
||||
|
||||
var arrow = Entities.addEntity({
|
||||
|
@ -429,16 +437,21 @@
|
|||
|
||||
checkStringHand: function() {
|
||||
//invert the hands because our string will be held with the opposite hand of the first one we pick up the bow with
|
||||
var triggerLookup;
|
||||
if (this.initialHand === 'left') {
|
||||
triggerLookup=1;
|
||||
this.getStringHandPosition = MyAvatar.getRightPalmPosition;
|
||||
this.stringTriggerAction = Controller.findAction("RIGHT_HAND_CLICK");
|
||||
// this.stringTriggerAction = Controller.findAction("RIGHT_HAND_CLICK");
|
||||
} else if (this.initialHand === 'right') {
|
||||
this.getStringHandPosition = MyAvatar.getLeftPalmPosition;
|
||||
this.stringTriggerAction = Controller.findAction("LEFT_HAND_CLICK");
|
||||
triggerLookup=0;
|
||||
// this.stringTriggerAction = Controller.findAction("LEFT_HAND_CLICK");
|
||||
}
|
||||
|
||||
this.triggerValue = Controller.getActionValue(this.stringTriggerAction);
|
||||
// print('TRIGGER VALUE:::' + this.triggerValue);
|
||||
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[triggerLookup]);
|
||||
|
||||
// this.triggerValue = Controller.getActionValue(this.stringTriggerAction);
|
||||
print('TRIGGER VALUE:::' + this.triggerValue);
|
||||
|
||||
if (this.triggerValue < DRAW_STRING_THRESHOLD && this.stringDrawn === true) {
|
||||
// firing the arrow
|
||||
|
|
Loading…
Reference in a new issue