Ok, I know it sounds simple, but I just didn't manage to make it. I want an entity which follows the mouse cursor, but its Z position must be always 0. (I need this to place 3d entities in my level using just the mouse)
here's what I tried, but the engine crashes or nothing happens:
action object()
{
VECTOR* temp;
while(1)
{
temp.x = mouse_pos.x;
temp.y = mouse_pos.y;
temp.z = 0;
vec_for_screen(temp,camera);
vec_set(me.x,temp.x);
wait(1);
}
}