   Position of gun to center of screen.
  I am building a FPS and i need a good formula on how to get the distance from the right-bottom screen to the center screen and far away (z-value) by 100.What i am trying to acheave is a path for my particles to go when firing my weapon.when rotating and looking around all my attempts formulas are not performing 100% same results...   
  If I understand your question correctly, you will need to 'unproject' your window coordinates back into world space.OpenGL and DirectX both have utility functions that will help you do this: glUnproject and D3DXVec3Unproject, respectively.   ;  i´l look in to that. thanks.   