Code:
ooh_.X = MOUSE_POS.X;
ooh_.Y = MOUSE_POS.Y;
ooh_.Z = 999999999;
vec_set( temp, ooh_);
vec_for_screen (ooh_,CAMERA);
temp.z = 0;
vec_for_screen (temp,CAMERA);
c_trace(temp,ooh_,ignore_Sprites|ignore_me);//|ignore_push|ignore_content
unit_targx[my.unit-1] = target.x;
unit_targy[my.unit-1] = target.y;
but the target of the unit is not being updated... and i dont know why...
EDIT: i'v been messing around with the code a bit and this seems to work injstead:
Code:
ooh_.X = MOUSE_POS.X;
ooh_.Y = MOUSE_POS.Y;
ooh_.Z = 10000;
vec_set( temp_vec, ooh_);
vec_for_screen (ooh_,CAMERA);
temp_vec.z = 0;
vec_for_screen (temp_vec,CAMERA);
c_trace(temp_vec,ooh_,ignore_Sprites|ignore_me);//|ignore_push|ignore_content
unit_targx[my.unit-1] = target.x;
unit_targy[my.unit-1] = target.y;
i defined a new vairiable called temp_var[3]; and then used that instead of tem, i dont understand, temp doesnt seem to be a vector anymore...