mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fixing spray can script
This commit is contained in:
parent
aaaee30032
commit
d91d0a2027
1 changed files with 8 additions and 7 deletions
|
@ -33,12 +33,17 @@
|
|||
var MIN_POINT_DISTANCE = 0.01;
|
||||
var STROKE_WIDTH = 0.02;
|
||||
|
||||
var TRIGGER_CONTROLS = [
|
||||
Controller.Standard.LT,
|
||||
Controller.Standard.RT,
|
||||
];
|
||||
|
||||
this.setRightHand = function () {
|
||||
this.hand = 'RIGHT';
|
||||
this.hand = 1;
|
||||
}
|
||||
|
||||
this.setLeftHand = function () {
|
||||
this.hand = 'LEFT';
|
||||
this.hand = 0;
|
||||
}
|
||||
|
||||
this.startNearGrab = function () {
|
||||
|
@ -46,11 +51,7 @@
|
|||
}
|
||||
|
||||
this.toggleWithTriggerPressure = function () {
|
||||
var handClickString = this.whichHand + "_HAND_CLICK";
|
||||
|
||||
var handClick = Controller.findAction(handClickString);
|
||||
|
||||
this.triggerValue = Controller.getActionValue(handClick);
|
||||
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[this.whichHand]);
|
||||
if (this.triggerValue < DISABLE_SPRAY_THRESHOLD && this.spraying === true) {
|
||||
this.spraying = false;
|
||||
this.disableStream();
|
||||
|
|
Loading…
Reference in a new issue