   Gun Camera View Identity Matrix
  Hi all,I have recently added a gun to follow the camera around by setting the view to an identity matrix so that the gun model is constantly close to the camera. However now the lighting model does not take the models movements because it is technically static. Is this the best method for implementing the gun camera? Would there be an easier way? Would I have to reset the view matrix to the cameras view half way through the shader code? I like the idea of using the identity matrix because its simple, but is it viable if I want the lighting to be realistic.Thanks all.   
Quote:Original post by MaddiusHi all,I have recently added a gun to follow the camera around by setting the view to an identity matrix so that the gun model is constantly close to the camera. However now the lighting model does not take the models movements because it is technically static. Is this the best method for implementing the gun camera? Would there be an easier way? Would I have to reset the view matrix to the cameras view half way through the shader code? I like the idea of using the identity matrix because its simple, but is it viable if I want the lighting to be realistic.Thanks all.I think it is not a good idea if you have to take account of many things like looking up and such. (If you look up with your setup you will still see the gun even thought you shouldn't)I think you have to set the view matrix of your gun to be the same as the rest of the game and change it each time the user (camera basically) moves.   