Apply camera position and rotation to an object(as an fps hand or gun etc)

Hi,i’m having an hard time to apply my camera rotation to a simple object,i really don’t understand what’s going wrong this is my code for now :

MAT4 model_mat;


  MAT4 cam_inverse;


  VEC3 world_cam_pos;

  world_cam_pos[0] = cam_inverse[3][0];

  world_cam_pos[1] = cam_inverse[3][1];

  world_cam_pos[2] = cam_inverse[3][2];



with this i can put an object in front of the camera view,but it gets no rotation…so i tried :


and i tried disperatly different combinations,but the maximum that i got was the model rotating in the opposite axis and opposite angle of my view (like i was rotatin and moving up the model would go left) if i go right the model goes down etc…please i need help i have to clue on what’s happening this is becoming a nightmare for me