Hello,
another probably stupid question (I am ashamed...)
I am using c_scan but it behaves quite odd...
I have empty wmb with just camera placed...no other objects.
When I push some button, a globe entity is created above the position of mouse pointer...that is ok...than I create another entity same way. My c_scan function should return distance of these globes if they are close enough...but it doesn´t. Instead of this, it returns distance from x-axis if it is within range of c_scan. Here is some code...
function odpud_x(var ENTpozitionX,var ENTpan)
{
var dist=0;
dist=c_scan(ENTpozitionX, ENTpan, vector(360,0,100),SCAN_ENTS);
if(you != NULL)
return dist;
}
it is called in action of every new enity in a loop:
sused_x=odpud_x(my.x,my.pan);
What am I doing wrong?