WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-19-2005, 12:54 PM
V.shazzle V.shazzle is offline
Member
 
Join Date: Sep 2005
Location: Stanford, CA
Posts: 2
Send a message via AIM to V.shazzle
adding 2D text via script

In Vizard 2.53, what is the script equivalent of using 'Add Text' in the Resource box?

ie. 'Add Text' -> text name is 'sample text' - how would I do that in code?


thanks!
Reply With Quote
  #2  
Old 09-19-2005, 02:04 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Here is sample code to add a text object to the screen.
Code:
MyText = viz.add(viz.TEXT3D,'Message',viz.SCREEN)
MyText.translate(0.5,0.5)
Reply With Quote
  #3  
Old 09-19-2005, 02:31 PM
V.shazzle V.shazzle is offline
Member
 
Join Date: Sep 2005
Location: Stanford, CA
Posts: 2
Send a message via AIM to V.shazzle
is there a way to add 2D text label or text that sticks to one positon on the screen regardless of the viewpoint?

for example: in Beginner's Tutorials - adding 2D and 3D text - Stuck to the world: 'White Text' stays in place while 'Yellow Text' moves around due to viewpoint change. How do I add something like 'White Text' via scripts?
Reply With Quote
  #4  
Old 09-19-2005, 02:45 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The code in the previous post does just that. It adds a text object to the screen, then translates it to the center. The text will stay in the same place on screen, no matter where the viewpoint is.
Reply With Quote
Reply

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


All times are GMT -7. The time now is 03:06 PM.


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