I havent looked at your upload yet MMike, but this is the
detecting with draw_line3d I was talking about.
Its not special at all, it just makes it easier to "see".

Click to reveal..
Code:
#include <litec.h>
#include <default.c>
#define PRAGMA_PATH "@Bits"


function main()
{
	video_switch(6,0,0);		wait(5);			level_load(NULL);			wait(5);
	vec_set(camera.x, vector(-750,250,0));
	//
	VECTOR from, to;
	ENTITY* sprite = ent_create("White_130x130x24.bmp", NULL, NULL);
	//
	while(1)
	{
		sprite.y -= key_cur - key_cul;
		sprite.z += key_cuu - key_cud;
		sprite.pan  -= key_del - key_pgdn;
		sprite.tilt += key_home - key_end;
		if(key_bksp)	sprite.y = sprite.z = sprite.pan = sprite.tilt = 0;
		//calculate (line-drawable) start and end
		vec_set(from, vector(camera.x+10,camera.y,camera.z)); 
		vec_set(to,   vector(mouse_cursor.x,mouse_cursor.y,1000));	vec_for_screen(to, camera);
		//
		if(c_trace(camera.x, to, SCAN_TEXTURE))
		{	//Draw RED line to Successful Target
			draw_line3d(from, NULL, 100);		draw_line3d(target.x, vector(0,0,255), 100);
		}
		else
		{	//Draw WHITE line to mouse
			draw_line3d(from, NULL, 100);		draw_line3d(to, vector(255,255,255), 100);
		}
		//
		wait(1);
	}

}



Imm looking at your code now...

[EDIT] Yeah, same thing for me too..



Last edited by EvilSOB; 06/29/10 10:31.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial