Posted By: Liamissimo
Mouse in 3D - 06/08/10 17:20
Hey,
it is very simple but I cant figure it out. I already did it and it worked but when i use the same code it isnt working. The block is coming from a special point to me. it isnt using the mouse pos.
if(mouse_left == 1)
{
vec_set(to, mouse_dir3d);
vec_scale(to, 1000);
c_trace(camera.x, to, 0);
vec_set(to,target);
ent_create("block.mdl",to,NULL);
}
yes, simple as hell. But the point is when I start at nullvector, it is in the upper left corner of the screen.
it is very simple but I cant figure it out. I already did it and it worked but when i use the same code it isnt working. The block is coming from a special point to me. it isnt using the mouse pos.
if(mouse_left == 1)
{
vec_set(to, mouse_dir3d);
vec_scale(to, 1000);
c_trace(camera.x, to, 0);
vec_set(to,target);
ent_create("block.mdl",to,NULL);
}
yes, simple as hell. But the point is when I start at nullvector, it is in the upper left corner of the screen.