WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-07-2014, 11:14 AM
BSUGeek BSUGeek is offline
Member
 
Join Date: Oct 2014
Posts: 23
Question <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'
Reply With Quote
  #2  
Old 10-08-2014, 03:15 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
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!
Reply With Quote
  #3  
Old 10-08-2014, 05:56 AM
BSUGeek BSUGeek is offline
Member
 
Join Date: Oct 2014
Posts: 23
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?
Reply With Quote
  #4  
Old 10-08-2014, 07:12 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
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)
Reply With Quote
  #5  
Old 10-08-2014, 07:44 AM
BSUGeek BSUGeek is offline
Member
 
Join Date: Oct 2014
Posts: 23
Thumbs up

That worked great! thanks a lot for your help
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 01:18 PM.


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