problem with yield statement and animation path
Hello!
I have an animation that goes through a maze in a loop (4 times). I also have a yield statement that waits for an arrow key (see code below in red) but whenever I have it inside the function, it offsets everything, the animation seems to play twice before waiting for the arrow key and then it offsets all coordinates. Why does that happen? Code:
import viz |
In order to run the code, I changed the model to the piazza. However, I didn't notice a coordinate offset from one trial to another. If you have viewpoint collision enabled and depending on the stepsize, the viewpoint can get bumped up on collisions with the scene. If you want to wait until the path is finished playing before doing something else, wait for a path end event:
Code:
import viz |
Thank you very much! Indeed, this version seems fine. I really need to troubleshoot my scripts usign that maze more in detail. Not sure why I get these resetting problems that I have been writing about. For now I solved the issue by not using animation paths but by using the goTo.
|
All times are GMT -7. The time now is 06:40 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC