vec_set(panel_1.pos_x, panel_2.pos_x);

Now vec_set have a vector (from pos_x upwards to pos_z), panel_1 without pos_x is not a vector!