WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 11-06-2015, 10:31 AM
chris2307 chris2307 is offline
Join Date: Nov 2013
Posts: 36
Positioning text with ORTHO parent

I am trying to display some text on a black screen in Vizard. On single screen applications, this is very easy; I just turn the world off and display my text with the screen as the parent, i.e.:

text1 = viz.addText(txt, parent=viz.SCREEN)
My problem is when I create a three-screen application. To do so, I am creating three viz.WINDOW objects and offsetting the left and right windows by +/- 60-deg. I have to set the parent to viz.ORTHO if I wish to see text on these windows. However, they are being positioned to the default location of the bottom left of the specified window which is not where I want to see them.

text1 = viz.addText(txt, parent=viz.SCREEN, parent=viz.ORTHO, scene = screen.leftWindow)
The setPosition() function no longer works so I'm not really sure what I need to be doing in order to correctly position the text relative to the window.
Reply With Quote
Old 11-06-2015, 01:42 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
You can specify pixel coordinates or link to a window location:

import viz

#set position in pixel coordinates
text1 = viz.addText('text1',parent=viz.ORTHO)

#link to center top
text2 = viz.addText('text2',parent=viz.ORTHO)

#link to upper left with offset
text3 = viz.addText('text3',parent=viz.ORTHO)
link =,text3)
Reply With Quote
Old 11-07-2015, 06:59 AM
chris2307 chris2307 is offline
Join Date: Nov 2013
Posts: 36

It was pixel coordinates. I was attempting to use the same normalised screen units that worked when I was using viz.SCREEN as the parent so this makes much more sense now.

Thanks :-)
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying screen text in 3D (Oculus Rift) pjayaram Vizard 2 05-27-2014 09:06 PM
input from a text file dig Vizard 5 10-20-2013 02:20 AM
Informationboxes with text snoopy78 Vizard 3 07-16-2009 11:23 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 10:39 PM
3d Text with Transparent Borders vjosh Vizard 3 12-01-2004 11:50 AM

All times are GMT -7. The time now is 01:17 PM.

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