Well this is one of those places where using a logic fails to a good math solution. Many other users are better at complex math ideas.
There are factors I can't know for your post.
Camera ISOMETRIC or NOT?
VEIW top down?
PANEL target same aspect as screen resolution?

Also you operate on vec.x/y with math, they are vars, and pixel locations are pure int, there is no x =5.74; This can be cause of some normal offset. And additively and cause a good amount of offset.

Here I'd be forced to use one of my very specific, guess and test solutions.
Find entity is above or below the accurate zone at bmap center.
Plug in a constant as a modifier and adjust it by a modifier.

Code:
draw_vec.y+=...........;
// end vec adjustment
if( draw_vec.y < panel.y+(panel_size.y/2)) // above center
{
  draw_vec.y(+-)= 5*(a modifier based on dist center-to-top)
}
// invert 
if( draw_vec.y > panel.y+(panel_size.y/2)) // below center
{
  draw_vec.y(+-)= 5*(a modifier based on dist center-to-top)
}



Mal
p.s. Very kind of you.

Last edited by Malice; 12/01/15 17:50.