vrChat.js VR version of chat window


If you want to see and type chat while wearing your Rift.


  • Press “]” to show/hide the chat window, located to the right of your view, such that with the Rift on you can turn your head a bit to see it.
  • Press “Tab” to focus on/off the text input. When it has focus there’s a blinking cursor.
  • Type your text and press “Enter” to chat it.

The chat history is populated if you have the script running when you start Interface.

BUG: Sometimes the window border is drawn the wrong size. If this happens, restart the script.

Some improvements that could be made sometime include: click on input pane to set focus; clickable list of online users at the top; scrollable chat history; make scrollable with Leap Motion controlled hands; (re)populate chat history when start script after Interface; fix the border size bug in Interface; add a JavaScript option to position 3D overlays in avatar coordinates so that the overlays move smoothly with you as you move rather than jerking from position to position; visually show whether dialog has focus or not; input from virtual keyboard.


Script download location: http://ctrlaltstudio.com/downloads/hifi/scripts/vrChat.js

(I can’t believe I omitted the link!)


I’ve updated the vrChat.js script per fixes in Interface’s orientations for “rectangle3d” overlays. … If your VR chat window has the window border and input pane border displaying horizontal, you need to get the update.


I’ve updated vrChat.js to use the same keys as the default Interface chat, i.e., “” to show the chat window and “Esc” to close it. (It overrides the default Interface chat if you’re in HMD display mode.)

Also, you can click on the dialog to give it focus so that you can type, and it loses focus if you click elsewhere.

Plus some updates per the new text rendering.

Location: http://ctrlaltstudio.com/downloads/hifi/scripts/vrChat.js


@ctrlaltdavid forgive me for not looking at the .js prior to asking this; when you override the default Interface chat, how do you accomplish the concept of overloading functions? My understanding (and it’s pretty weak) is unclear how overloading works in .js is it the same concept as in C++ and C#? Or does this require a different technique in Interface? Again, the use of this forum is far more powerful than simply web searching an issue I have. Can you advise?


@Captain_Oculus Hi. The overriding of the default Interface chat window is accomplished by capturing the “” and “Esc” keys at the appropriate times such that they’re not processed by Interface. And releasing them from capture at the appropriately times.

This is a matter of the High Fidelity scripting environment rather than anything JavaScript / C++ -ish.