<?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[Create Rocker Launcher]]></title><type><![CDATA[link]]></type><html><![CDATA[<p><a href="https://shootertutorial.files.wordpress.com/2015/06/rocketlauncher.jpg"><img class="alignnone size-large wp-image-642" src="https://shootertutorial.files.wordpress.com/2015/06/rocketlauncher.jpg?w=1024&#038;h=576" alt="RocketLauncher"   /></a></p>
<p>This will be the last weapon from <a href="https://www.unrealengine.com/content/b5db9911879141e99f8c34fb14b66691" target="_blank">Military Silver Pack</a> implemented. Basically BaseWeapon is finished now and adding new weapons is really easy.</p>
<p>What&#8217;s new in this post is camera shakes which can be used on explosions or big weapon fire effect.</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>WeaponType</strong></p>
<p>Open WeaponType enum and add RocketLauncher there. WeaponType is used on AnimationBlueprint so if you are adding weapon which will have different hands animation you need to add new type here.</p>
<hr />
<p><strong>New Socket</strong></p>
<p>Open hands skel mesh (Hero_FPP) and add new socket named S_RocketLauncher to b_RightWeapont bone.</p>
<hr />
<p><strong>Updating Animation Blueprint</strong></p>
<p>Now we need to update HeroFPP_AnimationBlueprint so hands will hold rocker launcher. Add new variables:</p>
<ul>
<li>RocketLauncherRecoil (bool),</li>
<li>RockerLauncherRecoilAlpha (float),</li>
</ul>
<p>Basically if you implemented rest of the weapons you know exactly what do to now.</p>
<p>In event graph Initialize Animation add RocketLauncherRecoil on FireWeapon.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/setrocketrecoil.jpg"><img class="alignnone wp-image-635 size-full" src="https://shootertutorial.files.wordpress.com/2015/06/setrocketrecoil.jpg?w=646&#038;h=361" alt="setrocketrecoil" width="646" height="361" /></a></p>
<p>And in UpdateAnimation drive RocketLauncherRecoilAlpha.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/recoilalpha.jpg"><img class="alignnone wp-image-636 size-large" src="https://shootertutorial.files.wordpress.com/2015/06/recoilalpha.jpg?w=1024&#038;h=392" alt="recoilalpha"   /></a></p>
<p>Interpt Speed is different here than in other weapons.</p>
<p>Now in Anim Graph make sure you connect pose to RocketLauncher enum! Here&#8217;s my graph:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/animbpgraph.jpg"><img class="alignnone size-medium wp-image-637" src="https://shootertutorial.files.wordpress.com/2015/06/animbpgraph.jpg?w=300&#038;h=117" alt="animbpgraph" width="300" height="117" /></a></p>
<hr />
<p><strong>BP_Weapon_RocketLauncher</strong></p>
<p>Now create new blueprint extending from BP_BaseWeapon name it BP_Weapon_RocketLauncher.</p>
<p>We need to modify some variables:</p>
<ul>
<li>CurrentAmmoInMag: 1,</li>
<li>MaxAmmoInMag: 1,</li>
<li>ReloadTime: 3,</li>
<li>AttachSocketName_FPP: S_RocketLauncher,</li>
<li>WeaponType: RocketLauncher,</li>
<li>SpreadMin: 0.1,</li>
<li>SpreadMax: 0.4,</li>
<li>SpreadCurrent: 0.2,</li>
<li>FireType: Projectile,</li>
</ul>
<p>Set WeaponMesh component to Rocket_Launcher_A.</p>
<hr />
<p><strong>Adding weapon to backpack</strong></p>
<p>Now open ShooterGameInstance and add this weapon to Inventory_Backpack so you can choose it and equip.</p>
<hr />
<p><strong>Impact Effect</strong></p>
<p>Create new blueprint extending from ImpactEffect and name it Impact_RocketLauncher.</p>
<ul>
<li>DefaultFX: P_RocketLauncher_Explosion_01</li>
<li>DefaultSound: RocketLauncher_Explosion_Cue</li>
<li>Is Using Hit Result: False,</li>
</ul>
<hr />
<p><strong>Projectile</strong></p>
<p>Create new blueprint extending form BP_BaseProjectile named BP_Projectile_RocketLauncher.</p>
<p>Components:</p>
<ul>
<li>Mesh should be set to RocketLauncherA_Ammo,</li>
<li>Add new Particle System Component: P_RocketLauncher_Trail_01,</li>
</ul>
<p>ProjectileMovement:</p>
<ul>
<li>Initial Speed: 5000,</li>
<li>Max Speed: 5000,</li>
</ul>
<p>Variables:</p>
<ul>
<li>IsCausingRadiusDamage: true,</li>
<li>ImpactEffect: Impact_RocketLauncher,</li>
</ul>
<hr />
<p><strong>Camera Shake</strong></p>
<p>Create new blueprint extending from CameraShake. Name it CameraShake_RocketLauncherFire.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/shakesettings.jpg"><img class="alignnone size-medium wp-image-639" src="https://shootertutorial.files.wordpress.com/2015/06/shakesettings.jpg?w=148&#038;h=300" alt="shakesettings" width="148" height="300" /></a></p>
<hr />
<p><strong>Updating weapon blueprint. </strong></p>
<p>Open BP_Weapon_RocketLauncher and update these variables:</p>
<ul>
<li>ProjectileClass: BP_Projectile_RocketLauncher,</li>
<li>ImpactEffect: Impact_RocketLauncher,</li>
</ul>
<p>Now in event graph create Event Fire.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/firerocket.jpg"><img class="alignnone size-medium wp-image-640" src="https://shootertutorial.files.wordpress.com/2015/06/firerocket.jpg?w=300&#038;h=72" alt="firerocket" width="300" height="72" /></a></p>
<p>Now you can create new AmmoData in ShooterGameInstance for rocket or just fill AmmoData in weapon blueprint.</p>
<p>And that&#8217;s it! Final result:</p>
<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/LE8Unnu6Ueo?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>
]]></html><thumbnail_url><![CDATA[https://i1.wp.com/shootertutorial.files.wordpress.com/2015/06/rocketlauncher.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[247]]></thumbnail_height><thumbnail_width><![CDATA[440]]></thumbnail_width></oembed>