<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Shooter Game Tutorial]]></provider_name><provider_url><![CDATA[http://shootertutorial.com]]></provider_url><author_name><![CDATA[andrzejkoloska]]></author_name><author_url><![CDATA[https://shootertutorial.com/author/andrzejkoloska/]]></author_url><title><![CDATA[Creating Sniper Rifle]]></title><type><![CDATA[link]]></type><html><![CDATA[<p><a href="https://shootertutorial.files.wordpress.com/2015/06/sniperscreen.jpg"><img class="alignnone wp-image-626 size-large" src="https://shootertutorial.files.wordpress.com/2015/06/sniperscreen.jpg?w=1024&#038;h=836" alt="sniperscreen"   /></a></p>
<p>As I wrote earlier will try to implement all of the weapons from <a href="https://www.unrealengine.com/content/b5db9911879141e99f8c34fb14b66691" target="_blank">Military Silver Pack.</a> Next in line is <strong>Sniper Rifle. </strong>Again we would need to implement new functionality to BaseWeapon &#8211; second fire. In this case second fire will trigger sniper scope.</p>
<ul>
<li>Sniper Rifle should have zoom and sniper scope functionality,</li>
<li>I want to have &#8220;bullet time&#8221; effect triggered sometimes, (camera chasing bullet),</li>
<li>Use BaseWeapon functionalities to drive the weapon,</li>
</ul>
<p>Lot of new stuff coming here.</p>
<p><!--more--></p>
<pre><strong>This Tutorial has been created using Unreal Engine 4.8.2</strong>. 
Make sure you are working on the same version of the engine.</pre>
<p><strong>Sniper Scope generally</strong></p>
<p>Couple of years ago I&#8217;ve created earlier 2 first person shooter games and as far I know there are 3 ways of doing scopes in games:</p>
<ul>
<li><strong>HUD overlay.</strong><br />
Just simple texture drawn on-screen with alpha. This way is mostly used in games that are lacking GPU performance because it&#8217;s the most fastest way for GPU.</li>
</ul>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='https://www.youtube.com/embed/5qQKo1iu-F0?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span></p>
<ul>
<li><strong>Render to texture.</strong><br />
Scope glass have different material which is rendering to texture part of the screen and displaying it on glass. Camera is moving near glass when zooming. You can a lot of features here because it&#8217;s rendered in world so you have whole shaders to drive effects. You need to render to texture in tick so it&#8217;s heavy for mobile, but you could use it without a problem on PC. It&#8217;s heavier than HUD overlay.</li>
</ul>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='https://www.youtube.com/embed/FcIGGBJiRwc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span></p>
<ul>
<li><strong>Postprocess Material.</strong><br />
Basically it&#8217;s &#8220;almost the same&#8221; as HUD overlay but you can use shaders here &#8211; you can make distortion, draw texture, point out enemies and lot&#8217;s of stuff. It&#8217;s hard to say how heavy it is compared to render to texture. It depends on engine and how it&#8217;s driving post process. This way doesn&#8217;t even work on mobile. For my opinion you will get the best results using this way.</li>
</ul>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='https://www.youtube.com/embed/L8SkldEMSjQ?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0' allowfullscreen='true'></iframe></span></p>
<p>Of course there could be other ways that I&#8217;m not aware of. Game development is dynamic and everything is changing often <span class='wp-smiley wp-emoji wp-emoji-smile' title=':)'>:)</span></p>
<p>I will implement them all to show you how to do it.</p>
<hr />
<p><strong>Overal &#8211; Preparing GameplayCharacter</strong></p>
<p>Basically using sniper scope is custom functionality that will be used only for Sniper weapons. We will trigger it using Right Mouse Button. Maybe later I will use Secondary fire for this.</p>
<p>Open GameplayCharacter and add two dispatchers:</p>
<ul>
<li>OnSecondaryEnter,</li>
<li>OnSecondaryLeave,</li>
</ul>
<p>Create Right Mouse Button event and connect those dispatchers.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/rightmousebutton.jpg"><img class="alignnone wp-image-577 size-full" src="https://shootertutorial.files.wordpress.com/2015/06/rightmousebutton.jpg?w=388&#038;h=253" alt="RightMouseButton" width="388" height="253" /></a></p>
<p>This functionality is generic and it will be used differently on each weapon. That&#8217;s why I have created dispatchers &#8211; weapons willing to use them will just bind to them.</p>
<p>Create new function named Set Fov. Inputs: NewFov (float)</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/setfov.jpg"><img class="alignnone size-medium wp-image-578" src="https://shootertutorial.files.wordpress.com/2015/06/setfov.jpg?w=300&#038;h=165" alt="SetFov" width="300" height="165" /></a></p>
<p>This function will be used to change fov when zooming. It will be driven from Weapon that&#8217;s why I have created function for this. (we don&#8217;t want to change variables from other classes!)</p>
<hr />
<p><b>Overall</b><strong> &#8211; BP_BaseWeapon</strong></p>
<p>Open BP_BaseWeapon we need to create some changes here. Create new variable:</p>
<ul>
<li>SpawnedProjectile (Actor)</li>
</ul>
<p>And in Fire function let&#8217;s assign spawned projectile to this variable.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/spawnedprojectile.jpg"><img class="alignnone size-medium wp-image-580" src="https://shootertutorial.files.wordpress.com/2015/06/spawnedprojectile.jpg?w=300&#038;h=121" alt="SpawnedProjectile" width="300" height="121" /></a></p>
<p>Yes, sniper will use projectiles instead of instant fire.</p>
<hr />
<p><b>Overall</b><strong> &#8211; Projectile</strong></p>
<p>Create new blueprint extending from BP_BaseProjectile named BP_Projectile_SniperWeapon.</p>
<p>ProjectileMovement Details:</p>
<ul>
<li>Initial Speed: 10 000,</li>
<li>Maximum Speed: 10 000,</li>
<li>Projectile Gravity Scale: 0,</li>
</ul>
<p>CollisionSphere Details:</p>
<ul>
<li>Sphere Radius: 1,</li>
</ul>
<p>Mesh Details:</p>
<ul>
<li>Static Mesh: SniperRifle_A_Ammo,</li>
<li>Rotation: (Pitch=-90.000000,Yaw=0.633023,Roll=-0.632935)</li>
</ul>
<p>Now create new camera component here and attach it to CollisionSphere. This will be our camera for bullet time. Place it somewhere near bullet.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/camera.jpg"><img class="alignnone size-medium wp-image-583" src="https://shootertutorial.files.wordpress.com/2015/06/camera.jpg?w=300&#038;h=194" alt="camera" width="300" height="194" /></a></p>
<ul>
<li>Camera Rotation: (Pitch=-10.000000,Yaw=0.000000,Roll=-0.000000)</li>
<li>Camera Location: (X=-36.583088,Y=0.000000,Z=14.872269)</li>
</ul>
<p>Now in event graph rotate the bullet and on projectile stop set view target to player.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/projectileventgraph.jpg"><img class="alignnone size-medium wp-image-582" src="https://shootertutorial.files.wordpress.com/2015/06/projectileventgraph.jpg?w=300&#038;h=192" alt="projectileventgraph" width="300" height="192" /></a></p>
<hr />
<p><strong>Overall &#8211; Creating Sniper Rifle blueprint. </strong></p>
<p>Create new enum SniperScopeType and add:</p>
<ul>
<li>RenderToTexture,</li>
<li>HUDOverlay,</li>
<li>Postprocess,</li>
</ul>
<p>Open WeaponType  enum and add SnipeRifle to it.</p>
<p>Create new blueprint based on BP_MainWeapon named BP_Weapon_SniperRifle.</p>
<p>Add those variables:</p>
<ul>
<li>SniperScopeType (Sniper Scope Type)</li>
<li>IsZooming (bool),</li>
<li>SniperScopeUI (user widget),</li>
<li>NormalFOV (float, default: 90),</li>
<li>ZoomedFOV (float, default: 20),</li>
<li>CanDoFinisher (bool),</li>
</ul>
<p>Fill rest of the data:</p>
<ul>
<li>Spread need to be 0,</li>
<li>ProjectileClass should be BP_Projectile_SniperWeapon,</li>
<li>FireType need to be Projectile,</li>
<li>WeaponType: SniperRifle,</li>
<li>WeaponMesh: Sniper_Rifle_A. Remember to put socket on your mesh and assign name to AttachSocketName_FPP</li>
</ul>
<p>Basically if you read previous tutorials you should be able to add new weapon without a problem!</p>
<p>Now in ShooterGameInstance add this weapon to the list so you will be able to equip it.</p>
<hr />
<p><strong>Overall &#8211; Sniper Rifle and hands.</strong></p>
<p>Basically we need hands pose for zooming the rifle. To do that open FPP_LauncherAim animation and record new animation without movement (we did that in earlier tutorials), so it won&#8217;t have any idle movement. I&#8217;ve named it FPP_LauncherAimPose. You could leave idle animation it will be harder to aim then because weapon will move slightly like in real world <span class='wp-smiley wp-emoji wp-emoji-wink' title=';)'>;)</span></p>
<p>Create animation montage from this pose and set slot to Normal.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/normalslot.jpg"><img class="alignnone size-medium wp-image-586" src="https://shootertutorial.files.wordpress.com/2015/06/normalslot.jpg?w=300&#038;h=149" alt="normalslot" width="300" height="149" /></a></p>
<p>Last thing here is to create loop animation in this montage. It&#8217;s little bit tricky:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/loop_0.jpg"><img class="alignnone size-medium wp-image-589" src="https://shootertutorial.files.wordpress.com/2015/06/loop_0.jpg?w=300&#038;h=105" alt="loop_0" width="300" height="105" /></a></p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/loop_1.jpg"><img class="alignnone size-full wp-image-588" src="https://shootertutorial.files.wordpress.com/2015/06/loop_1.jpg?w=196&#038;h=59" alt="loop_1" width="196" height="59" /></a></p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/loop_2.jpg"><img class="alignnone size-medium wp-image-587" src="https://shootertutorial.files.wordpress.com/2015/06/loop_2.jpg?w=300&#038;h=86" alt="loop_2" width="300" height="86" /></a></p>
<p>Now open HeroFPP_AnimationBlueprint and add those variables:</p>
<ul>
<li>SniperRecoil (bool),</li>
<li>SniperRecoilAlpha (float),</li>
<li>SniperIsZooming (bool),</li>
<li>SniperZoomingAlpha (float),</li>
</ul>
<p>Now in Event Graph -&gt; Initialize Animation there is CharacterFire custom event attached to OnCharacterFireWeapon dispatcher. We need to add Sniper Rifle recoil there.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/bindeventshootsniperrecoil.jpg"><img class="alignnone size-medium wp-image-590" src="https://shootertutorial.files.wordpress.com/2015/06/bindeventshootsniperrecoil.jpg?w=300&#038;h=201" alt="bindeventshootsniperrecoil" width="300" height="201" /></a></p>
<p>Now in update animation we need to check when we are doing zoom from SniperWeapon.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/sniperiszoominganimbp.jpg"><img class="alignnone size-medium wp-image-591" src="https://shootertutorial.files.wordpress.com/2015/06/sniperiszoominganimbp.jpg?w=300&#038;h=44" alt="SniperIsZoomingAnimBp" width="300" height="44" /></a></p>
<p>Thanks to that we will know in animation blueprint when player is zooming. Now we need to drive zooming alpha from this variable. Still in Update Animation:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/sniperzoomingalpha.jpg"><img class="alignnone size-medium wp-image-592" src="https://shootertutorial.files.wordpress.com/2015/06/sniperzoomingalpha.jpg?w=300&#038;h=161" alt="SniperZoomingAlpha" width="300" height="161" /></a></p>
<p>The same thing with SniperRecoil bool:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/sniperrecoil.jpg"><img class="alignnone size-medium wp-image-593" src="https://shootertutorial.files.wordpress.com/2015/06/sniperrecoil.jpg?w=300&#038;h=160" alt="sniperrecoil" width="300" height="160" /></a></p>
<p>Now in the Animation Graph you would need to create 3 poses:</p>
<ul>
<li>for keeping the weapons in hands,</li>
<li>for recoil,</li>
<li>for zooming,</li>
</ul>
<p>The last one is the most time-consuming one because you need to test it in-game if sniper is near player eye. Here&#8217;s my graph maybe will be helpful.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/animgraph.jpg"><img class="alignnone size-medium wp-image-594" src="https://shootertutorial.files.wordpress.com/2015/06/animgraph.jpg?w=300&#038;h=69" alt="animgraph" width="300" height="69" /></a></p>
<p>Make sure to connect the result to SnipeRifle in Enum!</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/sniperriflepose.jpg"><img class="alignnone size-medium wp-image-595" src="https://shootertutorial.files.wordpress.com/2015/06/sniperriflepose.jpg?w=300&#038;h=215" alt="sniperriflepose" width="300" height="215" /></a></p>
<p>You won&#8217;t be able to test it out because we are not driving IsZooming bool in SniperWeapon. Open BP_Weapon_SniperRifle and in begin play connect dispatchers created in GameplayCharacter.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/sniperonzoomin.jpg"><img class="alignnone size-medium wp-image-596" src="https://shootertutorial.files.wordpress.com/2015/06/sniperonzoomin.jpg?w=300&#038;h=185" alt="sniperonzoomin" width="300" height="185" /></a></p>
<p>If you place your weapon near camera you will see clipping. To fix that go to Project Settings -&gt; General Settings -&gt; Near Clip Plane set to 1. You would need to restart the editor to see the effect!</p>
<blockquote><p><strong>USEFUL TIP: </strong>Changing Near Clip Plane value to smaller one will cause more draw calls! Another thing is don&#8217;t try to set it to 0 <span class='wp-smiley wp-emoji wp-emoji-wink' title=';)'>;)</span></p></blockquote>
<p>We have our base in place now let&#8217;s move to creating overlay!</p>
<hr />
<p><strong>Scope &#8211; RenderToTexture.</strong></p>
<p>This is the most hard type to implement so I will do it as first. There&#8217;s great basics tutorial <a href="http://jvultimate.com/OldSite2/CreatingLensSniperScope.htm" target="_blank">here</a>. Download the M98b_scope.tga texture. (you can&#8217;t use it in commercial work!) You will need to have some 3d knowledge to be able to use this method.</p>
<p>There is one big problem with sniper rifle from military silver weapons pack. It have one material. Scope is in the same material as the rest. To be able to do it you would need to set different material for the scope glass only. It can be done using blender/3ds/maya if you export the .fbx file and import it again. I&#8217;ve tried to find contact to military weapons pack creators and let them know to add one sniper rifle with different material on scope glass but I wasn&#8217;t able to find it out.</p>
<p>What I have done in 3d program:</p>
<ul>
<li>Detached scope glass from the mesh and the skin,</li>
<li>Created UV for the scope,</li>
<li>Exported scope glass as different mesh,</li>
<li>Imported as skel mesh,</li>
</ul>
<p>So I have 3 meshes:</p>
<ul>
<li>Sniper rifle mesh from the pack. It have one material,</li>
<li>Sniper rifle mesh without the scope glass polygons. This mesh is added to WeaponMesh in weapon blueprint,</li>
<li>Sniper rifle scope glass mesh. It&#8217;s added as new Skel Mesh into SniperRifle blueprint and positioned where the scope should be,</li>
</ul>
<p>Basically if you want to create games by yourself you need to learn basics of 3d graphics. Creating UV, modifying polygons, exporting data, working on bones. There is a lot of tutorials on the web! It will take a couple of weeks to learn the basics but it&#8217;s necessary if you are seriously thinking about making games.</p>
<p>Create new 2d render target. My resolution is 512&#215;512. The bigger resolution the worst performance.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/createrendertarget.jpg"><img class="alignnone wp-image-601 size-large" src="https://shootertutorial.files.wordpress.com/2015/06/createrendertarget.jpg?w=1024&#038;h=357" alt="CreateRenderTarget"   /></a></p>
<p>And create new material which will use render target texture combined with M98b texture.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/rendertotexturematerial.jpg"><img class="alignnone size-medium wp-image-602" src="https://shootertutorial.files.wordpress.com/2015/06/rendertotexturematerial.jpg?w=300&#038;h=254" alt="rendertotexturematerial" width="300" height="254" /></a></p>
<p>Assign this material to your scope glass.</p>
<p>Open your sniper mesh that doesn&#8217;t have scope glass polygons or have different material ID for the glass and create new socket called &#8220;Scope&#8221;</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/scopesocketposition.jpg"><img class="alignnone wp-image-603 size-full" src="https://shootertutorial.files.wordpress.com/2015/06/scopesocketposition.jpg?w=585&#038;h=328" alt="scopesocketposition" width="585" height="328" /></a></p>
<p>It will be used to position Capture Component.</p>
<p>Now in your Sniper Weapon blueprint. Add the scope in place where the original scope was. Create new component &#8211; Scene Capture Component 2d.</p>
<ul>
<li>Field Of View should be 7,</li>
<li>Assign your Render Target texture,</li>
</ul>
<p>Add another component &#8211; camera and place it so it will see a weapon from left side.</p>
<p>In the begin play attach capture component to Scope socket.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/attachrendercomponent.jpg"><img class="alignnone size-medium wp-image-604" src="https://shootertutorial.files.wordpress.com/2015/06/attachrendercomponent.jpg?w=300&#038;h=97" alt="attachrendercomponent" width="300" height="97" /></a></p>
<p>Now in OnSecondaryEnter / OnSecondaryLeave dispatchers let&#8217;s play zoom pose which we created earlier.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/play-zoom-pose.jpg"><img class="alignnone size-medium wp-image-605" src="https://shootertutorial.files.wordpress.com/2015/06/play-zoom-pose.jpg?w=300&#038;h=209" alt="play zoom pose" width="300" height="209" /></a></p>
<p>Now in Tick we need to rotate the Scene Capture Component 2d to be sure it&#8217;s pointing where player is looking at.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/tick_0.jpg"><img class="alignnone size-medium wp-image-606" src="https://shootertutorial.files.wordpress.com/2015/06/tick_0.jpg?w=300&#038;h=104" alt="tick_0" width="300" height="104" /></a></p>
<p>Rest part:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/tick_1.jpg"><img class="alignnone size-medium wp-image-608" src="https://shootertutorial.files.wordpress.com/2015/06/tick_1.jpg?w=300&#038;h=139" alt="tick_1" width="300" height="139" /></a></p>
<p>Without this you will have different view when watching level from render texture.</p>
<p>Now we need to shoot the weapon so create Fire event.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/eventfire.jpg"><img class="alignnone size-medium wp-image-609" src="https://shootertutorial.files.wordpress.com/2015/06/eventfire.jpg?w=300&#038;h=102" alt="eventfire" width="300" height="102" /></a></p>
<p>If you want to have |bullet time effect&#8221; (don&#8217;t know how to name it) just add this in your Fire event.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/bullettime.jpg"><img class="alignnone size-medium wp-image-610" src="https://shootertutorial.files.wordpress.com/2015/06/bullettime.jpg?w=300&#038;h=123" alt="bullettime" width="300" height="123" /></a></p>
<p>In Tick we know if we are pointing the head, and here we can just change the camera with blend time and scale the time dilation.</p>
<p>That&#8217;s all here. Your scope using render to texture should fully work now!</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/rendertotexturescreen.jpg"><img class="alignnone wp-image-611 size-full" src="https://shootertutorial.files.wordpress.com/2015/06/rendertotexturescreen.jpg?w=649&#038;h=250" alt="rendertotexturescreen" width="649" height="250" /></a></p>
<p><strong>HUD Overlay</strong></p>
<p>This will be MUCH more easier to create. I&#8217;ve searched whole internet for some good free sniper scope texture and I haven&#8217;t found any. I have found <a href="https://shootertutorial.files.wordpress.com/2015/06/abee3-sniper20scope20border.png" target="_blank">this</a> but you can&#8217;t use it in commercial projects! If I will find free scope or something with commercial license to buy I will let you know! If you are graphics artist and you are able to create such scope &#8211; please create one and add to Turbosquid for couple of bucks and let me know!</p>
<p>Good think is that you can create this by yourself using Gimp. Found <a href="https://www.youtube.com/watch?v=hjKveXAVFcU" target="_blank">great tutorial on youtube</a>.</p>
<p>Import the scope texture into content browser. Create new Widget -&gt; UI_Debug_SniperScope and add the image into it. Make sure whole screen is filled.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/umg.jpg"><img class="alignnone size-medium wp-image-598" src="https://shootertutorial.files.wordpress.com/2015/06/umg.jpg?w=300&#038;h=216" alt="umg" width="300" height="216" /></a></p>
<p>Now get back to BP_Weapon_SniperRifle. In begin play I&#8217;m making sure scope and render to texture are hidden. I&#8217;m attaching new weapon mesh (from military pack silver).</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/hide.jpg"><img class="alignnone size-medium wp-image-612" src="https://shootertutorial.files.wordpress.com/2015/06/hide.jpg?w=300&#038;h=126" alt="hide" width="300" height="126" /></a></p>
<p>Now OnZoomIn event make sure you add widget on-screen.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/onzoomin.jpg"><img class="alignnone size-medium wp-image-613" src="https://shootertutorial.files.wordpress.com/2015/06/onzoomin.jpg?w=300&#038;h=89" alt="OnZoomIn" width="300" height="89" /></a></p>
<p>And on OnZoomOut remove it from the screen.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/onzoomout.jpg"><img class="alignnone size-medium wp-image-614" src="https://shootertutorial.files.wordpress.com/2015/06/onzoomout.jpg?w=300&#038;h=90" alt="OnZoomOut" width="300" height="90" /></a></p>
<p>Last thing is to drive fov in tick.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/setfovintick.jpg"><img class="alignnone size-medium wp-image-615" src="https://shootertutorial.files.wordpress.com/2015/06/setfovintick.jpg?w=300&#038;h=192" alt="setfovintick" width="300" height="192" /></a></p>
<p>And that&#8217;s it!</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/hudoverlay.jpg"><img class="alignnone wp-image-616 size-large" src="https://shootertutorial.files.wordpress.com/2015/06/hudoverlay.jpg?w=1024&#038;h=686" alt="hudoverlay"   /></a></p>
<hr />
<p><strong>Postprocess </strong></p>
<p>Before you start please read <a href="https://udn.epicgames.com/Three/DevelopmentKitGemsHUDDistortion.html" target="_blank">this documentation from UDN</a> and download sample images. Again you can&#8217;t use them in commercial work!</p>
<p>Open GameplayCharacter and variable:</p>
<ul>
<li>PostProcessReference (Post Process Volume),</li>
</ul>
<p>And these three functions:</p>
<ul>
<li>SetPostProcessSettings (input Post Process Volume)<br />
<a href="https://shootertutorial.files.wordpress.com/2015/06/setpostprocessettings.jpg"><img class="alignnone size-medium wp-image-624" src="https://shootertutorial.files.wordpress.com/2015/06/setpostprocessettings.jpg?w=300&#038;h=98" alt="setpostprocessettings" width="300" height="98" /></a></li>
<li>ShowSniperOverlay<br />
<img class="alignnone size-medium wp-image-622" src="https://shootertutorial.files.wordpress.com/2015/06/setsniperoverlay.jpg?w=300&#038;h=62" alt="setsniperoverlay" width="300" height="62" /></li>
<li>HideSniperOverlay<br />
<img class="alignnone size-medium wp-image-623" src="https://shootertutorial.files.wordpress.com/2015/06/clearsniperoverlay.jpg?w=300&#038;h=110" alt="clearsniperoverlay" width="300" height="110" /></li>
</ul>
<p>Those are the missing functions in Weapon Sniper OnZoomIn and OnZoomOut. You should call them now there.</p>
<p>Import the textures and create new material.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/scope-post-process-mat.jpg"><img class="alignnone size-medium wp-image-618" src="https://shootertutorial.files.wordpress.com/2015/06/scope-post-process-mat.jpg?w=300&#038;h=112" alt="scope post process mat" width="300" height="112" /></a></p>
<p>Make sure your material is PostProcess.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/materialdomain.jpg"><img class="alignnone wp-image-619 size-full" src="https://shootertutorial.files.wordpress.com/2015/06/materialdomain.jpg?w=593&#038;h=97" alt="materialdomain" width="593" height="97" /></a></p>
<p>Now in your level place Post Process Volume.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/addpostprocessvolume.jpg"><img class="alignnone size-medium wp-image-620" src="https://shootertutorial.files.wordpress.com/2015/06/addpostprocessvolume.jpg?w=300&#038;h=193" alt="addpostprocessvolume" width="300" height="193" /></a></p>
<p>In its settings:</p>
<ul>
<li>Unbound should be set to True,<br />
It means it will work even if you are outside the volume.</li>
</ul>
<p>Now go to Level Blueprint graph and create begin play. We need to assign this volume to our reference in GameplayCharacter.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/setpp.jpg"><img class="alignnone size-medium wp-image-621" src="https://shootertutorial.files.wordpress.com/2015/06/setpp.jpg?w=300&#038;h=95" alt="SetPP" width="300" height="95" /></a></p>
<p>And that&#8217;s it!</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/postprocess-screen.jpg"><img class="alignnone wp-image-625 size-large" src="https://shootertutorial.files.wordpress.com/2015/06/postprocess-screen.jpg?w=1024&#038;h=682" alt="postprocess screen"   /></a></p>
<p>It was post for more advanced blueprinters <span class='wp-smiley wp-emoji wp-emoji-wink' title=';)'>;)</span> As always take your time do experiments, add print text nodes. Don&#8217;t copy all!</p>
<p>Time spent on writing tutorial: 20h</p>
<blockquote><p>Creating ShooterTutorial takes a lot of my free time.<br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=8UXM3JZGDPPPE"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Buy Now Button" /><br />
</a>If you want you can help me out! I will use your donation to buy better assets packs and you will be added to Credits /Backers page as well.</p>
<p>Implementing game is taking time but writing about this is taking much more effort!</p></blockquote>
]]></html><thumbnail_url><![CDATA[https://i0.wp.com/shootertutorial.files.wordpress.com/2015/06/sniperscreen.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[330]]></thumbnail_height><thumbnail_width><![CDATA[404]]></thumbnail_width></oembed>