View Single Post
  #1  
Old 07-30-2014, 11:49 AM
lawry2 lawry2 is offline
Member
 
Join Date: Jul 2014
Posts: 2
Newbie - Trouble using loops

Hi all,

I'm new to using Vizard and am having difficulty using loops. My issue is that when I use a loop, it blocks the environment from being rendered. I thought that this was OK as I was using the same method I saw in the Vizard documentation.

Code:
import viz
import viztask

env = viz.add('../models/environment.OSGB')

viz.go()

def run():
	
	while True:
                # Something simple
		print viz.MainView.getPosition()
		print viz.MainView.getEuler()

viztask.schedule(run())
What I get here is just a black window. The model is never seen but the output window shows the camera Euler and position. I'm aware that the loop is blocking but how do I get around this?
Reply With Quote