Well the gun is in the camera's own coordinate system and vec_for_vertex would probably return the wrong result either way.
Just find it our yourself what it returns:
- Have the camera at 0-pos and 0-pan. Have your gun at 0-(view-)pos as well. Call vec_for_vertex on your gun and note the result (compare with MED).
- Put the gun at the right position and repeat.
- Moving and rotating the camera should return the same result.
- If so, use vec_rotate(temp,camera.pan) and vec_add(temp,camera.x) to get the world position.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends