![]() |
|
|
|
#1
|
|||
|
|||
|
You can apply the texture to a quad or other object:
http://docs.worldviz.com/vizard/#App...ure_basics.htm The vizact library includes a number of actions (e.g. vizact.move, vizact.moveTo) that animate objects: Code:
'''
Press the spacebar to move the quad to a random position on X axis
'''
import viz
import vizact
import vizinfo
viz.go()
vizinfo.InfoPanel()
viz.clearcolor(viz.SLATE)
quad = viz.addTexQuad(pos=[0,2,10])
texture = viz.addTexture('ball.jpg')
quad.texture(texture)
def moveQuad():
randomNumber = vizact.randint(-5,5)
move = vizact.moveTo([randomNumber,2,10],speed=1)
quad.runAction(move)
vizact.onkeydown(' ',moveQuad)
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trouble picking text3d objects | Salvar | Vizard | 4 | 12-01-2010 04:07 PM |
| Adding Objects to all Scenes | jassel41 | Vizard | 1 | 11-29-2010 03:35 AM |
| Semi-circle array containing target and distractor objects | ptjt255 | Vizard | 3 | 08-04-2009 04:09 AM |
| adding new objects | gina | Vizard | 4 | 11-29-2006 12:01 PM |
| Could not find plugin to load objects... | halley | Vizard | 1 | 05-30-2006 12:01 PM |