|  | 
| 
			 
			#1  
			
			
			
			
			
		 | |||
| 
 | |||
|  <window>.isCulled help 
			
			Hi everyone, I'm trying to figure out this <window>.isCulled stuff. I'm just testing it out right now. I have an avatar not in view when the world opens. He then begins to walk until he is in view. and I want the program to print out I see you but nothing is happening once the avatar walks into view. any help will be greatly appreciated. Code: avatar = viz.addAvatar('vcc_male2.cfg',pos=[-2,0,0])
if(viz.MainWindow.isCulled(avatar)==0): 
	print 'I See You' | 
| 
			 
			#2  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			It seems that you only check for visibility of the avatar once. You should put the isCulled check in a loop, so that Vizard continuously checks whether the avatar is in view. Hope that helps!
		 | 
| 
			 
			#3  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			Thanks that's very helpful.  so if i were to make a loop for it to check for visibility until the program stops how would I do that?
		 | 
| 
			 
			#4  
			
			
			
			
			
		 | |||
| 
 | |||
| 
			
			Use vizact.ontimer(). For more information, see http://docs.worldviz.com/vizard/comm...ct/ontimer.htm. An example use of vizact.ontimer:  Code: import vizact
def dostuff():
    print viz.getFrameNumber()
vizact.ontimer(1,dostuff) | 
| 
			 
			#5  
			
			
			
			
			
		 | |||
| 
 | |||
|   
			
			That worked great! thanks a lot for your help
		 | 
|  | 
| Thread Tools | |
| Display Modes | Rate This Thread | 
| 
 | 
 |