mirror of
https://github.com/overte-org/overte.git
synced 2025-06-15 16:19:16 +02:00
Removed CONTINUE_FAR_TRIGGER and CONTINUE_NEAR_TRIGGER
This commit is contained in:
parent
f11735550f
commit
cb51d00c1d
1 changed files with 9 additions and 29 deletions
|
@ -151,10 +151,8 @@ var STATE_HOLD_SEARCHING = 2;
|
||||||
var STATE_DISTANCE_HOLDING = 3;
|
var STATE_DISTANCE_HOLDING = 3;
|
||||||
var STATE_NEAR_GRABBING = 4;
|
var STATE_NEAR_GRABBING = 4;
|
||||||
var STATE_NEAR_TRIGGER = 5;
|
var STATE_NEAR_TRIGGER = 5;
|
||||||
var STATE_CONTINUE_NEAR_TRIGGER = 6;
|
var STATE_FAR_TRIGGER = 6;
|
||||||
var STATE_FAR_TRIGGER = 7;
|
var STATE_HOLD = 7;
|
||||||
var STATE_CONTINUE_FAR_TRIGGER = 8;
|
|
||||||
var STATE_HOLD = 9;
|
|
||||||
|
|
||||||
// "collidesWith" is specified by comma-separated list of group names
|
// "collidesWith" is specified by comma-separated list of group names
|
||||||
// the possible group names are: static, dynamic, kinematic, myAvatar, otherAvatar
|
// the possible group names are: static, dynamic, kinematic, myAvatar, otherAvatar
|
||||||
|
@ -197,21 +195,15 @@ CONTROLLER_STATE_MACHINE[STATE_HOLD] = {
|
||||||
updateMethod: "nearGrabbing"
|
updateMethod: "nearGrabbing"
|
||||||
};
|
};
|
||||||
CONTROLLER_STATE_MACHINE[STATE_NEAR_TRIGGER] = {
|
CONTROLLER_STATE_MACHINE[STATE_NEAR_TRIGGER] = {
|
||||||
name: "near_trigger",
|
name: "trigger",
|
||||||
|
enterMethod: "nearTriggerEnter",
|
||||||
updateMethod: "nearTrigger"
|
updateMethod: "nearTrigger"
|
||||||
};
|
};
|
||||||
CONTROLLER_STATE_MACHINE[STATE_CONTINUE_NEAR_TRIGGER] = {
|
|
||||||
name: "continue_near_trigger",
|
|
||||||
updateMethod: "continueNearTrigger"
|
|
||||||
};
|
|
||||||
CONTROLLER_STATE_MACHINE[STATE_FAR_TRIGGER] = {
|
CONTROLLER_STATE_MACHINE[STATE_FAR_TRIGGER] = {
|
||||||
name: "far_trigger",
|
name: "far_trigger",
|
||||||
|
enterMethod: "farTriggerEnter",
|
||||||
updateMethod: "farTrigger"
|
updateMethod: "farTrigger"
|
||||||
};
|
};
|
||||||
CONTROLLER_STATE_MACHINE[STATE_CONTINUE_FAR_TRIGGER] = {
|
|
||||||
name: "continue_far_trigger",
|
|
||||||
updateMethod: "continueFarTrigger"
|
|
||||||
};
|
|
||||||
|
|
||||||
function stateToName(state) {
|
function stateToName(state) {
|
||||||
return CONTROLLER_STATE_MACHINE[state] ? CONTROLLER_STATE_MACHINE[state].name : "???";
|
return CONTROLLER_STATE_MACHINE[state] ? CONTROLLER_STATE_MACHINE[state].name : "???";
|
||||||
|
@ -1627,27 +1619,15 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.nearTrigger = function() {
|
this.nearTriggerEnter = function() {
|
||||||
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
|
|
||||||
this.setState(STATE_OFF);
|
|
||||||
this.callEntityMethodOnGrabbed("stopNearTrigger");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.callEntityMethodOnGrabbed("startNearTrigger");
|
this.callEntityMethodOnGrabbed("startNearTrigger");
|
||||||
this.setState(STATE_CONTINUE_NEAR_TRIGGER);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.farTrigger = function() {
|
this.farTriggerEnter = function() {
|
||||||
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
|
|
||||||
this.setState(STATE_OFF);
|
|
||||||
this.callEntityMethodOnGrabbed("stopFarTrigger");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.callEntityMethodOnGrabbed("startFarTrigger");
|
this.callEntityMethodOnGrabbed("startFarTrigger");
|
||||||
this.setState(STATE_CONTINUE_FAR_TRIGGER);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.continueNearTrigger = function() {
|
this.nearTrigger = function() {
|
||||||
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
|
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
|
||||||
this.setState(STATE_OFF);
|
this.setState(STATE_OFF);
|
||||||
this.callEntityMethodOnGrabbed("stopNearTrigger");
|
this.callEntityMethodOnGrabbed("stopNearTrigger");
|
||||||
|
@ -1656,7 +1636,7 @@ function MyController(hand) {
|
||||||
this.callEntityMethodOnGrabbed("continueNearTrigger");
|
this.callEntityMethodOnGrabbed("continueNearTrigger");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.continueFarTrigger = function() {
|
this.farTrigger = function() {
|
||||||
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
|
if (this.triggerSmoothedReleased() && this.secondaryReleased()) {
|
||||||
this.setState(STATE_OFF);
|
this.setState(STATE_OFF);
|
||||||
this.callEntityMethodOnGrabbed("stopFarTrigger");
|
this.callEntityMethodOnGrabbed("stopFarTrigger");
|
||||||
|
|
Loading…
Reference in a new issue