View Single Post
  #1  
Old 09-25-2005, 06:25 PM
vsully vsully is offline
Member
 
Join Date: Sep 2004
Posts: 24
Send a message via AIM to vsully
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...

Thanks

Last edited by vsully; 09-25-2005 at 06:27 PM.
Reply With Quote