Posted By: picoder
c_trace problem - 04/20/12 08:56
If I change position of a model immediately before tracing, c_trace checks this model according to previous position.
I changed small.c in samples folder for test:
I changed small.c in samples folder for test:
Code:
function main() { level_load("small.hmp"); vec_set(camera.x,nullvector); vec_set(camera.pan,nullvector); ENTITY* target_ent = ent_create("earth.mdl", vector(0,0,1000), NULL); wait(-2); vec_set(target_ent.x,vector(100,0,0)); //if target position bigger than 982, it works. c_trace(camera.x,vector(982,0,0),IGNORE_PASSABLE); if (HIT_TARGET) { if(you==target_ent){beep();} } }