![]() |
#4
|
|||
|
|||
Whether we can do like this? see the & the attached files
#some problems exist. if I use quad = viz.addTexQuad(), then I can not add #the 'billboard' to the scene. how to figure out this? Appreciate
import viz viz.go() ####### Create surface to wrap the texture on #quad = viz.addTexQuad() #quad.setPosition([0, 1.5, 3]) #put quad in view #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") #####Whether we can do like this: ??? main = viz.add('c:\\VirtualWorlds\\table\\poolTableScene. 3DS') # the main scene billboard = main.getChild('billboards') # object, named 'billboards', component of 'poolTableScene.3DS' #quad = billboard.addTexQuad() quad.setPosition([0, 1.5, 3]) quad.texture(viz.WHITE) text = viz.addText('message', quad) text.setScale(0.2,0.2,0.2) text.alignment(viz.TEXT_CENTER_CENTER) text.color(viz.BLACK) text.setPosition(0,0,-.01) vizact.onkeydown(' ', text.message, "new message") |
|
|