View Full Version : Displaying vizinfo messages on Oculus Rift

03-06-2017, 07:47 PM
I set up a system a while ago with several messages. Some are toggled on / off when certain keys are pressed and others change their content when certain keys are pressed.
The messages are displayed using vizinfo.add('').
I now want these same messages to be shown on my Oculus Rift display (it doesn't matter if they are still on the monitor or not) but I can't find a good way to change the window these messages are displayed in. I also tried to create a canvas but this doesn't seem to work either.
Things do display if I do vizinfo.InfoPanel but I would rather leave it as is with the vizinfo.add('') if at all possible.

Any advice would be much appreciated about how to display messages created using vizinfo.add() onto the Oculus Rift.

Thanks in advance!

03-06-2017, 11:32 PM
Objects rendered to the screen will not appear in the Oculus. The GUI canvas makes it possible to render GUI elements and some GUI containers in the world but fixed to the viewpoint. The vizinfo.InfoPanel works with the canvas, while the older vizinfo.add() object does not.

03-10-2017, 09:14 AM
Thanks Jeff - that works for adding one message to the canvas. But I am trying to add multiple messages to the screen independently (toggling on / off at different times and changing text depending on user key strokes). I was wondering if you had any advice about how to do this? Thanks again!

03-13-2017, 04:03 AM
You could add multiple text objects to a panel and change them individually:

import viz
import vizinfo
import vizact


panel = vizinfo.InfoPanel('Message panel')
text1 = panel.addItem(viz.addText('message 1'))
text2 = panel.addItem(viz.addText('message 2'))
text3 = panel.addItem(viz.addText('message 3'))

vizact.onkeydown(' ',text2.message,'new message')