mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 05:17:24 +02: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 MIN_POINT_DISTANCE = 0.01;
|
||||||
var STROKE_WIDTH = 0.02;
|
var STROKE_WIDTH = 0.02;
|
||||||
|
|
||||||
|
var TRIGGER_CONTROLS = [
|
||||||
|
Controller.Standard.LT,
|
||||||
|
Controller.Standard.RT,
|
||||||
|
];
|
||||||
|
|
||||||
this.setRightHand = function () {
|
this.setRightHand = function () {
|
||||||
this.hand = 'RIGHT';
|
this.hand = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setLeftHand = function () {
|
this.setLeftHand = function () {
|
||||||
this.hand = 'LEFT';
|
this.hand = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.startNearGrab = function () {
|
this.startNearGrab = function () {
|
||||||
|
@ -46,11 +51,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.toggleWithTriggerPressure = function () {
|
this.toggleWithTriggerPressure = function () {
|
||||||
var handClickString = this.whichHand + "_HAND_CLICK";
|
this.triggerValue = Controller.getValue(TRIGGER_CONTROLS[this.whichHand]);
|
||||||
|
|
||||||
var handClick = Controller.findAction(handClickString);
|
|
||||||
|
|
||||||
this.triggerValue = Controller.getActionValue(handClick);
|
|
||||||
if (this.triggerValue < DISABLE_SPRAY_THRESHOLD && this.spraying === true) {
|
if (this.triggerValue < DISABLE_SPRAY_THRESHOLD && this.spraying === true) {
|
||||||
this.spraying = false;
|
this.spraying = false;
|
||||||
this.disableStream();
|
this.disableStream();
|
||||||
|
|
Loading…
Reference in a new issue