Sign in to follow this  
TheMonkeyFromMyShoe

Is there a way? Or is it guess-work?

Recommended Posts

This is kinda strange question, but, how should I go about making a gun in a first person view. Should I just find a position for the gun that looks good, or is there actually a certain way FPS's place their guns in the view? Angles, Location, FOV?... Should it be calculated and move around acting as if it were in a players hand, like in UT3 when u move quickly up and down u see more of the gun, its not like its fixed with the screen but kinda has a more loose control.

Share this post


Link to post
Share on other sites
oliii    2196
guns are usually special 3D models and animations, They are placed relative to the camera view, possibly with some sort of spring system to give the illusion of motion.

Also, they are often rendered as an extra pass, on top of the world geometry, with a Z buffer clear. That allows you to change your projection matrix and stuff like that (change of FOV for example, as you mentioned, changing the near plane and far plane clipping, ...). They can require extra steps, such as calculating reflections, and shadows.

Then usually the 2D HUD is drawn on top of everything, in a similar fashion (no z test, orthographic projection, render 2D items...).

Share this post


Link to post
Share on other sites
Hodgman    51231
Yeah, most games seem to render the gun seperately as an extra pass. The artist should be able to tweak it's position and the FOV that it is rendered with until it looks 'right'.
It seems to be the trend these days to rotate it a bit when the players view changes, to make it seem less static. e.g. if the player looks quickly to the right, the gun model will rotate left slightly.

Some games though (OFP/ARMA) just place the camera where the head is on the player model, and render the entire player model the same as any NPC. The gun is drawn in the world just like any other object, and the animations of the player model cause it to be positioned in front of the camera when aiming.

[edit]Video: http://www.youtube.com/watch?v=XYU8yvlhYeg&feature=related
This is a system I made a long time ago where the mouse moves the gun model, and then the camera rotates slowly to catch up to where the gun is pointing. </plug>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this