<?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[Add FPP arms and TPP mesh to your&nbsp;Character]]></title><type><![CDATA[link]]></type><html><![CDATA[<p><a title="Add FPP arms and TPP mesh to your Character" href="http://shootertutorial.com/2015/06/04/add-fpp-arms-and-tpp-mesh-to-your-character/"><img class=" aligncenter" src="https://i1.wp.com/giant.gfycat.com/PleasingTangibleCatfish.gif" alt="" /></a></p>
<p><a title="Tip: how to move assets from examples / different projects" href="http://shootertutorial.com/2015/06/03/tip-how-to-move-assets-from-examples-different-projects/" target="_blank">In earlier post </a>I&#8217;ve described how to move assets from Shooter Game Example. To complete this tutorial you will need to move Animations and Characters folders to your project.</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>First of all I&#8217;ll write down what I would like to achieve:</p>
<ul>
<li>I want to have animated hands attached to my first person character (which is GameplayPlayerCharacter in this case),</li>
<li>Hands should be aiming where I&#8217;m aiming and have idle animation,</li>
<li>If camera will be outside of my character I will see entire TPP mesh,</li>
<li>Character mesh should have idle animation,</li>
<li>I want to see my aiming from TPP mesh as well,</li>
</ul>
<p>Basically I wasn&#8217;t able to find a package with animated hands and character mesh. That&#8217;s why I will use assets from Shooter Example. You can find separated hands in Unity Asset store.</p>
<hr />
<p><strong>Fixing assets after importing.</strong></p>
<p>There is a couple of issues after copying assets to our project. Let&#8217;s deal with Materials &#8211; create new material like this:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/m_playermaterial.jpg" target="_blank"><img class="alignnone wp-image-204 size-medium" src="https://shootertutorial.files.wordpress.com/2015/06/m_playermaterial.jpg?w=300&#038;h=223" alt="M_Playermaterial" width="300" height="223" /></a></p>
<p>Name it M_Player and assign to HeroTPP and HeroFPP meshes. Now we aren&#8217;t focusing on graphics side so let&#8217;s leave it like it is. Later I will explain how to make this material better.</p>
<p>Let&#8217;s move to HeroFPP_AnimationBlueprint and delete every variable and everything from AnimGraph and EventGraph. Do the same with HeroFPP_AnimationBlueprint. They should be clean without any functionality because Shooter Game uses C++ to drive ShooterCharacter which we don&#8217;t have here.</p>
<hr />
<p><strong>GameplayPlayerCharacter </strong>adding hands and TPP mesh.</p>
<p>Open GameplayPlayerCharacter and in viewport lets update/add components:</p>
<ul>
<li>Mesh<br />
&#8211; Select TPP mesh and use animation blueprint: HeroTPP_AnimationBlueprint,<br />
&#8211; Location: (X=-0.000002,Y=-0.000001,Z=-86.000000) and Rotation: (Pitch=-0.000000,Yaw=-90.000000,Roll=-0.000000)<br />
&#8211; Set Owner No See to True, (thanks to this if we will be in different camera our TPP mesh will not be visible)</li>
<li>Add new component: Camera<br />
&#8211; Set its location to (X=0.000000,Y=0.000038,Z=75.990540)<br />
&#8211; Set Use Pawn Control Rotation to true,</li>
<li>Add new Skeletal Mesh component and name it FPPMesh<br />
&#8211; Move FPPMesh to Camera. So it will be attached to the Camera,<br />
&#8211; Select FPPMesh and use animation blueprint: HeroFPP_AnimationBlueprint,<br />
&#8211; Location: (X=-9.983782,Y=8.026691,Z=-145.999725),<br />
&#8211; Rotation: (Pitch=-0.000000,Yaw=-90.000000,Roll=-0.000000)<br />
&#8211; Set Only Owner See to True, (thanks to that only if we are in this pawn&#8217;s camera FPP mesh will be visible)</li>
<li>Now go to Class Defaults and disable Use Controller Rotation Yaw,</li>
</ul>
<p>That&#8217;s all here. Your components should look like this.</p>
<p><img class="alignnone size-full wp-image-207" src="https://shootertutorial.files.wordpress.com/2015/06/charactercomponents.jpg?w=221&#038;h=214" alt="charactercomponents" width="221" height="214" /></p>
<hr />
<p>Now let&#8217;s go to <strong>HeroFPP_AnimationBlueprint</strong> and just add FPP_LauncherIdle to your Animation Pose.</p>
<p><img class="alignnone wp-image-208 size-medium" src="https://shootertutorial.files.wordpress.com/2015/06/fppanimblueprint.jpg?w=300&#038;h=158" alt="fppanimblueprint" width="300" height="158" /></p>
<p>It&#8217;s all here. Compile and close.</p>
<hr />
<p>Now go to <strong>HeroTPP_AnimationBlueprint</strong> and add two new variables: Pitch and Yaw &#8211; both should be float, default 0. Then add this to your Event Graph:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/tpp_animeventgraph.jpg" target="_blank"><img class="alignnone wp-image-210 size-medium" src="https://shootertutorial.files.wordpress.com/2015/06/tpp_animeventgraph.jpg?w=300&#038;h=89" alt="tpp_animeventgraph" width="300" height="89" /></a></p>
<p>Basically we need Pitch and Yaw for our AimOffset. You can read about <a href="https://docs.unrealengine.com/latest/INT/Engine/Animation/AnimHowTo/AimOffset/index.html" target="_blank">aim offsets here. </a>Just recreate this animation blueprint:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/tpp_animgraph.jpg" target="_blank"><img class="alignnone wp-image-211 size-medium" src="https://shootertutorial.files.wordpress.com/2015/06/tpp_animgraph.jpg?w=300&#038;h=178" alt="tpp_animgraph" width="300" height="178" /></a></p>
<p>This is making sure that legs won&#8217;t be animated during AimOffset. I&#8217;ve used cached pose NormalMovement which can be created by right-click -&gt; New Save Cached Pose. Later on you can right-click and select this cached pose as I did. Another thing is Slot &#8211; I&#8217;ve used two: UpperBody and FullBody. You can create those by right-click -&gt; Slot&#8217;DefaultSlot&#8217; and then just open the magnifier.</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/addnewslot.jpg" target="_blank"><img class="alignnone wp-image-212 size-medium" src="https://shootertutorial.files.wordpress.com/2015/06/addnewslot.jpg?w=300&#038;h=117" alt="addnewslot" width="300" height="117" /></a></p>
<p>At this point if you don&#8217;t know how to use animation blueprints <a href="https://www.youtube.com/watch?v=C16vlfe3pXc&amp;index=20&amp;list=PLZlv_N0_O1gZS5HylO_368myr-Kg2ZLwb" target="_blank">you should watch these tutorials made by Epic.</a></p>
<hr />
<p>Now let&#8217;s test this out! To do so place a camera in your level to be sure that it can see player. (PlayerStart) And in Level Blueprint just add these to toggle camera:</p>
<p><a href="https://shootertutorial.files.wordpress.com/2015/06/togglecamera.jpg" target="_blank"><img class="alignnone wp-image-213 size-medium" src="https://shootertutorial.files.wordpress.com/2015/06/togglecamera.jpg?w=300&#038;h=222" alt="togglecamera" width="300" height="222" /></a></p>
<p>And run the game!</p>
]]></html><thumbnail_url><![CDATA[https://i2.wp.com/shootertutorial.files.wordpress.com/2015/06/togglecamera.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[325]]></thumbnail_height><thumbnail_width><![CDATA[440]]></thumbnail_width></oembed>