mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Fix mini tablet sometimes remaining parented when it shouldn't be
This commit is contained in:
parent
ba56457663
commit
80aa74600f
1 changed files with 6 additions and 1 deletions
|
@ -804,6 +804,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function exitMiniGrabbed() {
|
||||||
|
// Explicitly unparent mini tablet in case controller grabbing code has reparented it.
|
||||||
|
ui.release();
|
||||||
|
}
|
||||||
|
|
||||||
function expandMini() {
|
function expandMini() {
|
||||||
var scaleFactor = (Date.now() - miniExpandStart) / MINI_EXPAND_DURATION;
|
var scaleFactor = (Date.now() - miniExpandStart) / MINI_EXPAND_DURATION;
|
||||||
if (scaleFactor < 1) {
|
if (scaleFactor < 1) {
|
||||||
|
@ -896,7 +901,7 @@
|
||||||
MINI_GRABBED: { // Mini tablet is grabbed by other hand.
|
MINI_GRABBED: { // Mini tablet is grabbed by other hand.
|
||||||
enter: null,
|
enter: null,
|
||||||
update: updateMiniGrabbed,
|
update: updateMiniGrabbed,
|
||||||
exit: null
|
exit: exitMiniGrabbed
|
||||||
},
|
},
|
||||||
MINI_EXPANDING: { // Mini tablet is expanding before showing tablet proper.
|
MINI_EXPANDING: { // Mini tablet is expanding before showing tablet proper.
|
||||||
enter: enterMiniExpanding,
|
enter: enterMiniExpanding,
|
||||||
|
|
Loading…
Reference in a new issue