WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Displaying vizinfo messages on Oculus Rift (https://forum.worldviz.com/showthread.php?t=5970)

cmitchel 03-06-2017 06:47 PM

Displaying vizinfo messages on Oculus Rift
 
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!

Jeff 03-06-2017 10: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.

cmitchel 03-10-2017 08: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!

Jeff 03-13-2017 03:03 AM

You could add multiple text objects to a panel and change them individually:

Code:

import viz
import vizinfo
import vizact

viz.go()

panel = vizinfo.InfoPanel('Message panel')
panel.addSeparator()
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')



All times are GMT -7. The time now is 02:00 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC