I was linked to the following function when I asked for code to send a trace from the mouse to below ground(for an rts).This code was going to be used for selection purposes etc. could someone fix this so it worked,or write a new one with the same purpose?
here is the function:
code\
VECTOR targVec;
function mouseTrace()
{
VECTOR from;
VECTOR to;
from = vec_for_vertex(mouse_pos,camera);
to.x = mouse_pos.x;
to.y = mouse_pos.y;
to.z = -3000;
c_trace(from,to,IGNORE_PASSABLE | IGNORE_SPRITES | IGNORE_MODELS);
vec_set(targVec,target);
}
\code
please help!
any help is greatly appreciated.
thanks in advance!
Last edited by the_mehmaster; 01/02/09 22:27.