WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 12-11-2015, 01:32 AM
Silvie Silvie is offline
Join Date: Dec 2015
Posts: 7
Question False Viewpoint


I'm trying to create an experimental study with worldviz and I have a problem with the viewpoint.

I'm using vizconnect and I'm trying to start different szenarios randomly from a list. So, this is the code and it works well.

list = [self.situation1,self.situation4]
for a in range(len(list)):

this = random.choice(list)
if this == self.situation1:
self.vp = vizconnect.addViewpoint(pos=[-2, 0, -1])

elif this == self.situation4:

self.vp = vizconnect.addViewpoint(pos=[0, 0, -5])

yield this.task ()
yield viztask.waitTrue( lambda: this.lookedAt == True)
yield this.szenario()

The problem is, that all szenarios starts at another viewpoint and people can walk through the virtual when one szenario is finished and the next starts the viewpoint is a different one and not the one I programmed. I think perhaps I had to reset the viewpoint before the next szenario starts but it doesn' work. I tried it with vizconnect.resetViewpoints()......

Has anyone an idea?? That would be great!!!

Thank you!
Reply With Quote
Old 12-16-2015, 02:00 AM
Silvie Silvie is offline
Join Date: Dec 2015
Posts: 7
Please...can anyone help me? I'm really frustrated...
Reply With Quote
Old 12-16-2015, 06:56 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,466
You can remove the last viewpoint and call resetViewpoints() after the next one is added. The following alternates between two viewpoints, vp1 and vp2:

display = vizconnect.getDisplay()

def viewTask():
	while True:
		yield viztask.waitKeyDown(' ')
		yield viztask.waitKeyDown(' ')
viztask.schedule( viewTask() )
Does this help?
Reply With Quote
Old 01-04-2016, 08:11 AM
Silvie Silvie is offline
Join Date: Dec 2015
Posts: 7
Hi Jeff,

thanks for your answer and sorry for my late answer, I was on holiday

I tried your code but its not working yet-
I can see that theres something happen with the viewpoint but not the right thing....

So, I trie it tomorrow again...perhaps I can find out what the problem is and write more..

Thanks, Silvie
Reply With Quote

random choose, vizconnect

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to track the actual viewpoint Jerry Vizard 3 05-25-2016 09:44 AM
Viewpoint with collision buffer issue Kevin1270 Vizard 3 09-20-2012 11:48 AM
Avatar w/ hat cannot look at viewpoint TrashcanPatrol Vizard 5 08-19-2008 08:26 AM
3d viewpoint movement spacefarer Vizard 9 07-25-2006 03:37 PM
VRML Viewpoint error bstankie Vizard 1 03-11-2003 02:10 PM

All times are GMT -7. The time now is 02:38 AM.

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