Stop all script in HMD mode, and your a sitting duck. and no desktop mouse!


#1

Problem, when your in HMD mode and you want to restart all your scripts some reason the control something. for safety i did stop all scripts, and then i wanted to click load default scripts.

Well, that’s not working !
Because you stop all scripts you lose the basic controller access. (yuck)
Also when you switch to desktop mode. You not have any mouse pointer to load the default script. And no , pressing ESC does not work, because that script is stopped to !

So at the end if you stop all scripts to restart it clean. (i do not trust always “reload scripts” your a sitting duck and you can only kill interface.exe the hard way.

That doe snot fix everything, i now need to dig into the interface.ini file to turn HMD off, so i can restart scripts and get my mouse pointer back.

change in the interface.ini this, so it looks like below to get desktop mode back.

[Display]
Desktop=true
OpenVR%20%28Vive%29=false

#2

Fell into a similar cursor trap while working on my virtual hand controllers.

Here is a Client script that might help in your case too:

With the at=stop hash param, when the script is unloaded it restores the mouse cursor – which specifically addresses the “Reload All” scenario. Without the hash param it works as an include so could alternatively be bound to a permanent keybinding as a kind of lifeline:

Script.include('https://cdn.rawgit.com/humbletim/hifi-aux/9bfc7cdd/snippets/restore-mouse-cursor.js');
// defines restoreMouseCursor(debug);
/*menu, keyboard or something*/.connect(restoreMouseCursor);

The most import lines in the script are probably:

Reticle.allowMouseCapture = true;
Reticle.visible = true;
// Reticle.position = {x:0, y:0}; // to make sure cursor is not in lala land