WorldToScreen Quake1
WorldToScreen Quake1
hey, i was wondering if anyone had a WorldToScreen function for quake1, the function itself takes 3d world Coords and converts them to 2d co wards for x y in relation to your monitor, and help or ideas would be great, i have a function in quake that semi works ill post it later on if anyone is interested.
you should be able to obtain a copy of the projection and modelview matricies.
just multiply the source coord by those two matricies and you'll have the 2d coord. it'll typically come out as a value between -1 and 1, so it'll need scaling and biasing.
this is the 'project' function available to csqc.
just multiply the source coord by those two matricies and you'll have the 2d coord. it'll typically come out as a value between -1 and 1, so it'll need scaling and biasing.
this is the 'project' function available to csqc.