mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +02:00
No hysteresis.
This commit is contained in:
parent
cd1780efef
commit
bfb697bc77
1 changed files with 3 additions and 8 deletions
|
@ -85,15 +85,10 @@ function Trigger(label) {
|
||||||
state = 'full';
|
state = 'full';
|
||||||
} else if (that.triggerSmoothedReleased()) {
|
} else if (that.triggerSmoothedReleased()) {
|
||||||
state = null;
|
state = null;
|
||||||
// These depend on previous state:
|
|
||||||
// null -> squeezed ==> partial
|
|
||||||
// full -> !squeezed ==> partial
|
|
||||||
// Otherwise no change.
|
|
||||||
} else if (that.triggerSmoothedSqueezed()) {
|
} else if (that.triggerSmoothedSqueezed()) {
|
||||||
if (!state) {
|
// Another way to do this would be to have hysteresis in this branch, but that seems to make things harder to use.
|
||||||
state = 'partial';
|
// In particular, the vive has a nice detent as you release off of full, and we want that to be a transition from
|
||||||
}
|
// full to partial.
|
||||||
} else if (state === 'full') {
|
|
||||||
state = 'partial';
|
state = 'partial';
|
||||||
}
|
}
|
||||||
that.state = state;
|
that.state = state;
|
||||||
|
|
Loading…
Reference in a new issue