Showing posts with label Sniper. Show all posts
Showing posts with label Sniper. Show all posts

Wednesday, 18 June 2014

Sniper shooter Part 2

Sniper shooter prototype part 2:

Lets set up cameras for the game. We need two cameras for the gun after setting them up we will add the cameras to the gun prefab so that it can be reused easily. Follow the steps for this purpose

  • Download the following textures of crosshair for normal and zoom camera 



Normal cam crosshair

Zoom cam crosshair


  • Make an empty game object in your scene name it as player or whatever you like.
  • Make GunsAndHands prefab child of this gameobject you created and change its position to (0,0.7297325,0).
  • Now make another empty gameobject in the scene (name it cameras) make this gameobject child of "player" gameobject then change its position vector to (0,1,0)
  • Create a camera gameobject in the scene name it as MainCamera change the tag of this gameobject to "MainCamera"(you will have to create a new tag) with the following settings



  • Make the MainCamera gameobject child of "cameras" and change its position  to (0,-0.177351,0)
  • Now the next camera will be of zoom so it will a have a lesser Field of view(FOV)
    and more far clipping than main camera so create a new camera with the following settings and name it as ZoomCamera with the following settings
  • Make ZoomCamera child of cameras and change its position to (0.3755417 , -0.2398739 , 3.198844)
  • Now its time to putcrosshairs in place. We have to put transparent planes in front of cameras and then apply the textures. As plane available in unity is not transparent and it consists of lot of vertice so here I have a custom plane for this purpose. You can download the project and find how crosshairs work.
So this is how our game should look like by now


You can download the unity package from here  (PlayerPrefab is the updated one)

Tuesday, 17 June 2014

Sniper Shooting prototype (Part 1)

Hi,

First of all what we need is a Sniper gun model (.fbx format) with the animation like


  • idle
  • walk
  • reload
So as I know that most of the game devs are not in to the 3D asset development so I am going to share the model of gun in this post. We will use the First person camera view with model (animations are included in the unity package).

Please download the package, drag the gun into your scene and see how the animations works. The motion which makes the sniper gun move little bit in and out of the axis because of wind pressure is part of idle animation so, it will help in making game little more interesting. (I have not made this model so we must thanks the random guy over who has shared it over the internet)

You can download from here