Ist jetzt mehr geraten aber evtl löst sich das problem wenn du diese drei zeilen an den anfang der while loop schreibst (also mit in die while loop hinein):
tempvar[0]=my.x;
tempvar[1]=my.y;
tempvar[2]=my.z+50;
Denn: vec_to_screen übersetzt von welt koordinaten in bildschirm koordinaten.
also machst du wahrscheinlich einmal das richtige welt koordinaten -> bildschirm koordinaten und anschließend werden jedesmal die bildschirm koordinaten wieder umgewandelt in bildschirmkoordinaten
Kann mich aber auch irren.
edit:
Quote aus dem manual dazu:
Converts the XYZ coordinates of the given vector to screen coordinates. After the instruction, the X and Y coordinates of the vector contain the XY screen position and the Z coordinate contains the distance to the screen plane.
Dürfte also ein problem wenn nicht das problem sein.