WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 02-11-2018, 10:45 PM
saravanan.balak saravanan.balak is offline
Join Date: Feb 2018
Posts: 3
Post Unable to move from one scene to another in Vizard?

Dear all

Could you please help me with the following items?

I face some issues on the following:

1. I have four scenes in which, I will have to have a multiple choice questions at the end of each scene. After pressing enter, it should go to Scene 2, followed by multiple choice questions. It should continue for the all the four scenes.

Could anyone please help me with this?

How can I do it?

Reply With Quote
Old 02-12-2018, 07:11 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
Take a look at the viztask module. That will help with setting up the program flow. You can wait for a button event before changing the scene. The designing an experiment tutorial uses a GUI and waits for a button event.
Reply With Quote
Old 02-13-2018, 05:40 AM
saravanan.balak saravanan.balak is offline
Join Date: Feb 2018
Posts: 3
Could you please share another example?
Reply With Quote
Old 02-15-2018, 09:27 AM
rajnishv rajnishv is offline
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Hi saravanan.balak,

You just need to use the below code to switch between viewpoints by loading and removing the appropriate models at runtime.

Beelow is the code for switching between 2 viewpoints but only one single (you can use 2 models and load and remove/unload at runtime and changes the view points.

import viz
import vizact
import vizconnect
import viztask

# start the vizconnect session stored in the given directory

# oriMode sets what the viewpoint is resetting to. For example...
# matches orientation of the display to the orientation of the viewpoint
# matches orientation of the feet to the orientation of the viewpoint
# matches orientation of the base object (transport, avatar, tracker) to the orientation of the viewpoint
# Similar for posMode
oriMode = vizconnect.VIEWPOINT_MATCH_DISPLAY
posMode = vizconnect.VIEWPOINT_MATCH_FEET

# Add a viewpoint.
vp1 = vizconnect.addViewpoint(	pos=[-13.24803, 12.28260, 8.83578],
								euler=[90, 0, 0],
vp2 = vizconnect.addViewpoint(	pos=[-17.24803, 4.28260, 5.83578],
								euler=[90, 0, 0],
# Displays are added to viewpoints, the viewpoint will traverse the scenegraph to
# determine if the display is attached to an avatar, tracker, etc in order to
# perform the requested resets.

# add an environment

display = vizconnect.getDisplay()

def viewTask():
	while True:
		print'before 1st waitkeydown '
		yield viztask.waitKeyDown(' ')
		print'before 2nd waitkeydown '
		yield viztask.waitKeyDown(' ')
viztask.schedule( viewTask() )

Mr.Rajnish Vishwakarma

Last edited by rajnishv; 02-15-2018 at 09:31 AM.
Reply With Quote

changing scenes, decision box

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
Using move() and spinTo efficiently Shweta Vizard 3 07-29-2014 06:10 PM
Exporting the vizard full scene pankaj bansal Vizard 6 12-29-2012 09:47 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 11:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 11:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 12:13 PM

All times are GMT -7. The time now is 11:25 AM.

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