WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   python dicts and vizard world loading... (https://forum.worldviz.com/showthread.php?t=423)

vsully 09-25-2005 06:25 PM

python dicts and vizard world loading...
 
Hi, weird quirky bug:

I have a python dict of avatars, where an avatar's name (a string) maps to a custom-built class that sub-classes off VizAvatar.

All the avatars load properly, but a couple seconds after the world first appears (as the load 'print' commands are flushing to console), one of the avatars is translated to an off position.

That is, the following command is applied during load, written outside any functions:

...

mydict['myavatar'].translate([1,0,1], viz.ABSOLUTE_WORLD)

...

The problem is that not only does 'myavatar' move to that position, a few seconds later (when print commands get flushed to screen) 'myavatar2' does so as well. For kicks I put the .translate() command in a function and called the function on load, but same thing.

When I put the translate commands in keyboard callback functions they work fine. Which makes sense then, as whenever i ask for mydict['myavatar'] and mydict['myavatar2'] i get avatar objects with unique memory addresses.

Some kind of loading quirk maybe?

Quite annoying... :rolleyes:

Thanks

farshizzo 09-26-2005 09:17 AM

Hi,

Would you mind providing me with a sample script that recreates the problem? This only happens when you use a python dictionary to hold the avatars?


All times are GMT -7. The time now is 04:11 PM.

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