WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
Old 03-08-2010, 04:36 AM
4711 4711 is offline
Join Date: Jan 2010
Posts: 15
How to pause the Vizard simulation?

Hi guys,

I have a simple problem: I just want the whole Vizard simulation to pause for a few seconds, and afterwards continue from where it stopped right before. During that pause, no navigation through the simulation must be allowed (that is, MainView mustn't change).

So I tried:
import time
time.sleep( several seconds )
This in fact freezes the whole simulation for the stated amount of time, but meanwhile mouse input is still accepted, which is then executed right after waking from time.sleep(). That means, if the user continues moving the mouse during this pause, the whole input is recorded (instead of being ignored), and the corresponding movement just gets performed afterwards.

Of course this is not what I wanted, so I tried it another way:
viz.mouse( viz.OFF )
yield viztask.waitTime( several seconds )
viz.mouse( viz.ON )
This actually works fine (user cannot navigate and input is ignored), except one thing: The player keeps drifting through the environment - seemingly with the speed and direction of the last accepted input received before the mouse became switched off - until the viztask expires. So clearly that's useless for me, too.

Now I wonder if there is any passably simple solution for this problem?
Reply With Quote

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
Realistic Light and Shadows Using Vizard and 3DS Max jde Vizard 4 07-13-2012 10:58 AM
.3DS importing in Vizard and 3D Studio jde Vizard 1 08-28-2009 03:14 PM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 09:39 PM
Vizard won't run wouters Vizard 5 02-05-2008 11:12 AM

All times are GMT -7. The time now is 03:47 AM.

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