super simple question!

Posted By: Omicron_NEGA

super simple question! - 02/21/09 14:56

first,hi@all
then,i want to conver sun 3Dpos(xyz)to 2Dpos(xy),
and i tried vec_to_screen(sun_pos,camera),and heres my problem:
how can i get 2Dposition's vector?
like
var scr_x;
var scr_y;
scr_x=vec_to_screen(sun_pos,camera).x //ofcourse this wont work
or somethin else?
thx !
Posted By: WretchedSid

Re: super simple question! - 02/21/09 20:32

The function returns an normal Vector with z = 0.
Posted By: EvilSOB

Re: super simple question! - 02/21/09 20:39

He means use
VECTOR scr_pos;
scr_pos = vec_to_screen(sun_pos,camera); //scr_pos.z will always be zero
Posted By: Omicron_NEGA

Re: super simple question! - 02/25/09 15:30

thx!
and one more:
does that means:
1:scr_pos .x=Valuable data converted by function
2:scr_pos .y=Valuable data converted by function
3:scr_pos .z=zero
© 2024 lite-C Forums