WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-26-2008, 07:36 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can make a text3d object a child of a texture quad. Here, the text object is slighly offset the quad in the z direction so it can be seen clearly.
Press the spacebar to change the message

Code:
import viz

viz.go()

# Create surface to wrap the texture on
quad = viz.addTexQuad()
quad.setPosition([0, 1.5, 3]) #put quad in view

# Wrap white texture on quad
quad.texture(viz.WHITE) 

#create text object and make it a child of the texture quad
text = viz.addText( 'message', quad ) 
text.setScale(.1,.1,.1)
text.alignment(viz.TEXT_CENTER_CENTER)
text.color(viz.BLACK)
text.setPosition(0,0,-.01)

#press space bar to change message
vizact.onkeydown(' ', text.message, "new message")
Reply With Quote
 


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 11:11 AM.


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