Delay without viz.waittime?
Hi,
how do I put a delay inside my skript? without viz.waittime which stalls the whole scene. I want a projector screen to move down bevor graphs get put on it. If I do: screenWall.goto(0,-2.2,0, .8) putGraphOnScreenWall() the graphs are on the ScreenWall before it is down... Thank you, Johannes |
You will need to use a callback for this. The following callback is called every time a built-in animation finishes. Check when the screen has finished moving then call your function:
Code:
def onactionend(object,action,pool): |
Thank you.
It works 90 % fine. When the user klicks on the graphOnWall Checkbox again, before the projection-surface is completely up, the graphs get put in the air. I guess that is because while the projection-Surface is moved up and the user clicks the checkbox the movement is stopped => ACTION_END_EVENT is triggered, checkbox is ON and so the graphs get put in the air. To solve this I would need to check, if the ACTION_END_EVENT occured after the surface moved down vs. up. Sorry, solved it while writing this: if checkboxWall.get()==1 and screenWall.get(viz.POSITION)[1]==0: |
All times are GMT -7. The time now is 01:32 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC