mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:07:58 +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';
|
var handToDisable = 'none';
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
|
// print('disabled in update:::'+handToDisable)
|
||||||
if (handToDisable !== 0) {
|
if (handToDisable !== 0) {
|
||||||
leftController.update();
|
leftController.update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,11 @@
|
||||||
|
|
||||||
var USE_DEBOUNCE = false;
|
var USE_DEBOUNCE = false;
|
||||||
|
|
||||||
|
var TRIGGER_CONTROLS = [
|
||||||
|
Controller.Standard.LT,
|
||||||
|
Controller.Standard.RT,
|
||||||
|
];
|
||||||
|
|
||||||
function interval() {
|
function interval() {
|
||||||
var lastTime = new Date().getTime();
|
var lastTime = new Date().getTime();
|
||||||
|
|
||||||
|
@ -144,6 +149,8 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
startNearGrab: function() {
|
startNearGrab: function() {
|
||||||
|
|
||||||
|
print('START BOW GRAB')
|
||||||
if (this.isGrabbed === true) {
|
if (this.isGrabbed === true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -226,6 +233,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
createArrow: function() {
|
createArrow: function() {
|
||||||
|
print('create arrow')
|
||||||
this.playArrowNotchSound();
|
this.playArrowNotchSound();
|
||||||
|
|
||||||
var arrow = Entities.addEntity({
|
var arrow = Entities.addEntity({
|
||||||
|
@ -429,16 +437,21 @@
|
||||||
|
|
||||||
checkStringHand: function() {
|
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
|
//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') {
|
if (this.initialHand === 'left') {
|
||||||
|
triggerLookup=1;
|
||||||
this.getStringHandPosition = MyAvatar.getRightPalmPosition;
|
this.getStringHandPosition = MyAvatar.getRightPalmPosition;
|
||||||
this.stringTriggerAction = Controller.findAction("RIGHT_HAND_CLICK");
|
// this.stringTriggerAction = Controller.findAction("RIGHT_HAND_CLICK");
|
||||||
} else if (this.initialHand === 'right') {
|
} else if (this.initialHand === 'right') {
|
||||||
this.getStringHandPosition = MyAvatar.getLeftPalmPosition;
|
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);
|
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[triggerLookup]);
|
||||||
// print('TRIGGER VALUE:::' + this.triggerValue);
|
|
||||||
|
// this.triggerValue = Controller.getActionValue(this.stringTriggerAction);
|
||||||
|
print('TRIGGER VALUE:::' + this.triggerValue);
|
||||||
|
|
||||||
if (this.triggerValue < DRAW_STRING_THRESHOLD && this.stringDrawn === true) {
|
if (this.triggerValue < DRAW_STRING_THRESHOLD && this.stringDrawn === true) {
|
||||||
// firing the arrow
|
// firing the arrow
|
||||||
|
|
Loading…
Reference in a new issue