Hi,

I have trouble with converting the 3d pos of an object to the 2d pos for draw_text. The text is not drawn direct at the object but instead is drawn with an offset. Is that cause I show the VIEW on a panel bmap which is smaller than the VIEW's size?

Code:
//do only once
small_view.bmap = bmap_createblack(450, 450, 24);

...
objectview_panel.bmap = small_view.bmap; //to show it ontop of the interface	
vec_set(draw_vec, ent_obj.x);	
vec_to_screen(draw_vec, small_view); // to screen coordinates
str_for_num(draw_str, ent_obj.HEALTH);
draw_text(draw_str, draw_vec.x, draw_vec.y, vector(255, 255, 255));



For solution see end page 1 / page 2

Last edited by Reconnoiter; 12/03/15 12:25.