Or try to use this to get a vector normal to the specific cube face:
vec_set(to,mouse_dir3d);
vec_scale(to,2000);
vec_add(to,mouse_pos3d);
c_trace(mouse_pos3d,to,USE_BOX | IGNORE_SPRITES | IGNORE_FLAG2);
vec_set(to,target.x);
vec_set(vec_normal,normal);
As Uhrwerk said, you can examine the greatest value with the normalvector from this code.
Last edited by gameplan; 10/03/12 19:23.