<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unreal engine AI Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/tag/unreal-engine-ai/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/tag/unreal-engine-ai/</link>
	<description>Detailed Game Programming Tutorials</description>
	<lastBuildDate>Thu, 19 Jan 2023 20:49:16 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://couchlearn.com/wp-content/uploads/2020/05/cropped-logolarge-32x32.png</url>
	<title>unreal engine AI Archives - Couch Learn</title>
	<link>https://couchlearn.com/tag/unreal-engine-ai/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>AI Following the Player in Unreal Engine 5</title>
		<link>https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 19 Jan 2023 20:47:42 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Following the Player in Unreal Engine 5]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[easy difficulty]]></category>
		<category><![CDATA[ue ai follow player]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 ai]]></category>
		<category><![CDATA[ue5 ai follow player]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 AI]]></category>
		<category><![CDATA[unreal engine AI]]></category>
		<category><![CDATA[unreal engine AI follow player]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=2068</guid>

					<description><![CDATA[<p>One common feature of many modern games is AI characters or enemies chasing or following the player. Luckily adding this functionality is incredibly easy and <a class="mh-excerpt-more" href="https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/" title="AI Following the Player in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/">AI Following the Player in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>One common feature of many modern games is AI characters or enemies chasing or following the player. Luckily adding this functionality is incredibly easy and only takes a few blueprint nodes.<br><br>In this guide we are adding the ability for AI Following the Player in Unreal Engine 5.</p>



<h2 class="wp-block-heading">Before we Start</h2>



<p>This guide continues on from the CouchLearn guide <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" target="_blank" rel="noreferrer noopener">&#8220;Setting up a NavMesh in Unreal Engine 5&#8221;</a>.<br><br>Our previous guide explains how to set up a <strong>basic NavMesh</strong> and <strong>AI character</strong> in your Unreal Engine 5 project. Follow the previous guide found <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" target="_blank" rel="noreferrer noopener">here</a> or <a href="https://couchlearn.gumroad.com/l/iywam?wanted=true" target="_blank" rel="noreferrer noopener">download the project files here</a>.</p>



<h2 class="wp-block-heading">Chasing the Player</h2>



<p>In the previous <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" target="_blank" rel="noreferrer noopener">&#8220;Setting up a NavMesh in Unreal Engine 5&#8221;</a>. guide, we finished off with these blueprint nodes to move the AI character around the level.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="789" height="456" src="https://couchlearn.com/wp-content/uploads/2023/01/image-13.png" alt="All blueprint nodes from the previous step." class="wp-image-2076" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-13.png 789w, https://couchlearn.com/wp-content/uploads/2023/01/image-13-300x173.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-13-768x444.png 768w" sizes="(max-width: 789px) 100vw, 789px" /></figure>



<p>Firstly, delete the &#8220;Get Actor Location&#8221; and &#8220;GetRandomReachablePointInRadius&#8221; nodes from the graph.<br><br>These nodes are currently trying to find a random position around the AI. We want the AI to use the player&#8217;s location so it is safe to delete these two nodes.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="746" height="450" src="https://couchlearn.com/wp-content/uploads/2023/01/image-18.png" alt="Deleting the GetActorLocation and GetRandomReachablePointInRadius nodes" class="wp-image-2084" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-18.png 746w, https://couchlearn.com/wp-content/uploads/2023/01/image-18-300x181.png 300w" sizes="(max-width: 746px) 100vw, 746px" /></figure>



<p>Next, add a new &#8220;Get Player Character&#8221; node to the blueprint graph.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="845" height="441" src="https://couchlearn.com/wp-content/uploads/2023/01/image-19.png" alt="Adding the Get Player Character node" class="wp-image-2085" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-19.png 845w, https://couchlearn.com/wp-content/uploads/2023/01/image-19-300x157.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-19-768x401.png 768w" sizes="(max-width: 845px) 100vw, 845px" /></figure>



<p>Then, connect the blue &#8220;Return Value&#8221; pin to the blue &#8220;Target Actor&#8221; pin on the &#8220;AI MoveTo&#8221; node.<br><br>This will now get our &#8220;Target Actor&#8217;s&#8221; location for the AI movement.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="807" height="433" src="https://couchlearn.com/wp-content/uploads/2023/01/image-20.png" alt="Connecting the Get Player Character node to the Target Actor pin of the AI MoveTo node" class="wp-image-2086" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-20.png 807w, https://couchlearn.com/wp-content/uploads/2023/01/image-20-300x161.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-20-768x412.png 768w" sizes="(max-width: 807px) 100vw, 807px" /></figure>



<p>As our AI might fail to move, if the player isn&#8217;t reachable in the navmesh, we now connect the &#8220;On Fail&#8221; pin to the &#8220;Delay&#8221; node.<br><br>This now retries the movement if the player is unreachable or the AI fails the nav mesh movement for any reason. This step will keep the AI following the player no matter the situation.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="834" height="429" src="https://couchlearn.com/wp-content/uploads/2023/01/image-23.png" alt="Connecting the On Fail pin to the Delay node" class="wp-image-2089" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-23.png 834w, https://couchlearn.com/wp-content/uploads/2023/01/image-23-300x154.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-23-768x395.png 768w" sizes="(max-width: 834px) 100vw, 834px" /></figure>



<p>Lastly, make sure to Compile and Save the blueprint editor. This will ensure the changes are applied when we play in the editor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="284" height="148" src="https://couchlearn.com/wp-content/uploads/2023/01/image-17.png" alt="Compile and save the blueprint and actor" class="wp-image-2082"/></figure>



<h3 class="wp-block-heading">Use Cases</h3>



<p>Even thought these steps are easy and only a few blueprint nodes are used, this basic system can enable many types of AI in modern games.<br><br>A few examples of this could be:</p>



<ul class="wp-block-list">
<li>Companion AI following the player around an open world like Skyrim (Using the <a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Unreal Engine dynamic open world navigation</a>).</li>



<li>Zombie AI chasing the player (Using the <a href="https://couchlearn.com/multiplayer-damage-and-health-system-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Unreal Engine damage system</a>).</li>
</ul>



<h3 class="wp-block-heading">Demo Video</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="800" height="449" src="https://couchlearn.com/wp-content/uploads/2023/01/AIFollowingPlayer.webp" alt="The AI following the player character around the Unreal Engine level." class="wp-image-2092"/></figure>



<h2 class="wp-block-heading">Download the Project Files</h2>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://gumroad.com/l/fmkwr">Loading&#8230;</a></div>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Now your AI character / enemy is following and chasing the player character around the level in Unreal Engine 5!<br><br>As explained in the previous step, this basic system can be expanded to implement many modern game AI behaviours into your Unreal Engine project. To learn more about the capabilities of AI and Navigation in Unreal Engine, consider reading further using the links below.<br><br>Further Reading:<br><a href="https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">How to smoothly rotate AI characters in Unreal Engine</a><br><a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Open world navigation in Unreal Engine</a><br><a href="https://couchlearn.com/easy-dynamic-pathfinding-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Dynamically generated navigation in Unreal Engine</a><br><a href="https://docs.unrealengine.com/5.0/en-US/navigation-system-in-unreal-engine/" target="_blank" rel="noreferrer noopener">Official Unreal Engine Navigation documentation<br></a></p>
<p>The post <a href="https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/">AI Following the Player in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Smoothly Rotate AI Characters in Unreal Engine 4</title>
		<link>https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/</link>
					<comments>https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 17 Dec 2020 16:12:59 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[ai smooth rotation]]></category>
		<category><![CDATA[couch learn]]></category>
		<category><![CDATA[How to Smoothly Rotate AI Characters in Unreal Engine 4]]></category>
		<category><![CDATA[smooth rotation]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue4 AI]]></category>
		<category><![CDATA[ue4 ai smooth rotation]]></category>
		<category><![CDATA[unreal ai smooth]]></category>
		<category><![CDATA[unreal engine 4]]></category>
		<category><![CDATA[unreal engine 4 ai]]></category>
		<category><![CDATA[unreal engine AI]]></category>
		<category><![CDATA[unreal engine smooth rotation]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1310</guid>

					<description><![CDATA[<p>The default behaviour for Unreal Engine 4 AI characters is to instantly snap towards the direction they are facing. AI smooth rotation in Unreal Engine <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/" title="How to Smoothly Rotate AI Characters in Unreal Engine 4">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/">How to Smoothly Rotate AI Characters in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>The default behaviour for Unreal Engine 4 AI characters is to instantly snap towards the direction they are facing. <br><br>AI smooth rotation in Unreal Engine 4 is simple and requires very little change to your existing AI characters.<br><br>In this guide we will be making your AI character smoothly turn when moving between locations.<br><br><em><strong>If you don&#8217;t have a simple AI character <a href="https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/">read our guide here.</a></strong></em></p>



<h2 class="wp-block-heading">Smoothing the Turning</h2>



<p>Firstly, click the top section of the character in the top left side of the editor window.<br><br><strong>In our case this is AITestCharacter(self)</strong>.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="294" height="173" src="https://couchlearn.com/wp-content/uploads/2020/11/image-9.png" alt="Selecting the main actor" class="wp-image-1328"/></figure>



<p>This will now show the character and actor information in the details section on the right.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="777" height="651" src="https://couchlearn.com/wp-content/uploads/2020/11/image-10.png" alt="Showing the actor info" class="wp-image-1329" srcset="https://couchlearn.com/wp-content/uploads/2020/11/image-10.png 777w, https://couchlearn.com/wp-content/uploads/2020/11/image-10-300x251.png 300w, https://couchlearn.com/wp-content/uploads/2020/11/image-10-768x643.png 768w" sizes="(max-width: 777px) 100vw, 777px" /></figure>



<p>In the Pawn section, <strong>Untick </strong>the &#8220;Use Controller Rotation Yaw&#8221;</p>



<figure class="wp-block-image size-large"><img decoding="async" width="470" height="222" src="https://couchlearn.com/wp-content/uploads/2020/11/image-11.png" alt="Disabling the yaw controller rotation" class="wp-image-1330" srcset="https://couchlearn.com/wp-content/uploads/2020/11/image-11.png 470w, https://couchlearn.com/wp-content/uploads/2020/11/image-11-300x142.png 300w" sizes="(max-width: 470px) 100vw, 470px" /><figcaption>This prevents the AI from snapping towards the controller direction.</figcaption></figure>



<p>Next, click the &#8220;CharacterMovement (Inherited)&#8221; section to show the character movement settings on the right.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="299" height="197" src="https://couchlearn.com/wp-content/uploads/2020/11/image-8.png" alt="Selecting the character movement component" class="wp-image-1321"/></figure>



<p>In the top right search box type &#8220;rotation&#8221; to show the related options.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="465" height="497" src="https://couchlearn.com/wp-content/uploads/2020/11/image-13.png" alt="Searching in the details panel for Rotation settings" class="wp-image-1333" srcset="https://couchlearn.com/wp-content/uploads/2020/11/image-13.png 465w, https://couchlearn.com/wp-content/uploads/2020/11/image-13-281x300.png 281w" sizes="(max-width: 465px) 100vw, 465px" /></figure>



<p>In the Character Movement Rotation Settings tab, change the Z Rotation Rate value to 180 and <strong>tick </strong>the &#8220;Orient Rotation to Movement&#8221; box.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="465" height="189" src="https://couchlearn.com/wp-content/uploads/2020/11/image-14.png" alt="Setting the Z value to 180 and ticking orient rotation to movement" class="wp-image-1334" srcset="https://couchlearn.com/wp-content/uploads/2020/11/image-14.png 465w, https://couchlearn.com/wp-content/uploads/2020/11/image-14-300x122.png 300w" sizes="(max-width: 465px) 100vw, 465px" /></figure>



<h2 class="wp-block-heading">Demonstration</h2>



<p>In this demo we show AI smooth rotation in Unreal Engine 4 that use the Troll mesh and animations from the<a href="https://www.unrealengine.com/marketplace/en-US/item/1fb552504c4f4700bfddb127bf1d1189/"> Troll Pack PBR asset pack found on the Unreal Marketplace by InfinityPBR.</a></p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading">Instant AI Rotation</h3>



<figure class="wp-block-image size-large"><img decoding="async" width="800" height="450" src="https://couchlearn.com/wp-content/uploads/2020/12/instantairotation.gif" alt="Instant rotation of AI" class="wp-image-1345"/></figure>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading">Smooth AI Rotation</h3>



<figure class="wp-block-image size-large"><img decoding="async" width="800" height="450" src="https://couchlearn.com/wp-content/uploads/2020/12/smoothairotation.gif" alt="Smooth rotation of AI" class="wp-image-1344"/></figure>
</div>
</div>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Your AI characters now rotation smoothly and can be customised based on the agility of your game characters!<br><br><em>Let us know in the comments or contact us directly if you have any problems or want to request new Unreal Engine 4 topics.</em><br><br><strong>Further Reading:</strong><br><br>To enable your AI characters to roam large open worlds, <a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/">check out our guide on enabling dynamic nav mesh generation.</a><br><br>To read more about AI in Unreal Engine, <a href="https://docs.unrealengine.com/en-US/InteractiveExperiences/ArtificialIntelligence/BehaviorTrees/BehaviorTreesOverview/index.html">click here to read the official documentation on Behaviour Trees.</a><br></p>
<p>The post <a href="https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/">How to Smoothly Rotate AI Characters in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Easy AI Movement in Unreal Engine 4</title>
		<link>https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/</link>
					<comments>https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Fri, 13 Mar 2020 02:26:00 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[AI movement]]></category>
		<category><![CDATA[how to add AI into ue4 game]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue4 AI]]></category>
		<category><![CDATA[ue4 AI character]]></category>
		<category><![CDATA[ue4 ai movement]]></category>
		<category><![CDATA[ue4 ai pawn]]></category>
		<category><![CDATA[unreal AI tutorial]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 4]]></category>
		<category><![CDATA[unreal engine AI]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=883</guid>

					<description><![CDATA[<p>Unreal Engine 4 has robust pathfinding and AI movement built in. Using the navmesh (Navigation Mesh) and a pawn or character, simple and advanced AI <a class="mh-excerpt-more" href="https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/" title="Easy AI Movement in Unreal Engine 4">[...]</a></p>
<p>The post <a href="https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/">Easy AI Movement in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Unreal Engine 4 has robust pathfinding and AI movement built in. <br><br>Using the navmesh (Navigation Mesh) and a pawn or character, simple and advanced AI can be created that interact with the world and the player. Even in a multiplayer session!<br><br>With very little setup you can implement Simple AI Movement in Unreal Engine 4.<br><br>In this guide we will be setting up the basics needed for Simple AI Movement in Unreal Engine 4 and explaining the differences between the pawn and character objects.</p>



<h3 class="wp-block-heading">Navigation Mesh</h3>



<p>Before we create our AI blueprint, we need to add a navigation mesh into our level.<br><br><strong>The navigation mesh generates the area that your AI is able to move it. <br></strong><br>If there are objects in the way it will generate around these areas preventing your AI from walking into those objects.</p>



<h4 class="wp-block-heading">Creating the Mesh</h4>



<p>In the modes tab, found on left in the main editor window, search for the nav mesh bounds volume.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="343" height="175" src="https://couchlearn.com/wp-content/uploads/2020/03/image-5.png" alt="Adding the nav mesh bounds" class="wp-image-1088" srcset="https://couchlearn.com/wp-content/uploads/2020/03/image-5.png 343w, https://couchlearn.com/wp-content/uploads/2020/03/image-5-300x153.png 300w" sizes="(max-width: 343px) 100vw, 343px" /></figure>



<p>Drag this into your level and set the size and position of the box to be the size of your level.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="844" height="492" src="https://couchlearn.com/wp-content/uploads/2020/03/image-6.png" alt="Configuring the nav mesh bounds to the level size" class="wp-image-1089" srcset="https://couchlearn.com/wp-content/uploads/2020/03/image-6.png 844w, https://couchlearn.com/wp-content/uploads/2020/03/image-6-300x175.png 300w, https://couchlearn.com/wp-content/uploads/2020/03/image-6-768x448.png 768w" sizes="(max-width: 844px) 100vw, 844px" /></figure>



<p>Once you drag this into your level it will automatically generate the navigation mesh.<br><br><strong>Pressing the P key will show the nav mesh in green.</strong></p>



<figure class="wp-block-image size-large"><img decoding="async" width="758" height="466" src="https://couchlearn.com/wp-content/uploads/2020/03/image-7.png" alt="Making the nav mesh bounds visible in the camera with the p key" class="wp-image-1090" srcset="https://couchlearn.com/wp-content/uploads/2020/03/image-7.png 758w, https://couchlearn.com/wp-content/uploads/2020/03/image-7-300x184.png 300w" sizes="(max-width: 758px) 100vw, 758px" /></figure>



<p><strong>Your level is now ready for AI characters and pawns.</strong></p>



<h3 class="wp-block-heading">Character or Pawn</h3>



<h4 class="wp-block-heading">What&#8217;s the difference?</h4>



<p>The two default AI controlled types are the Pawn and the Character.</p>



<figure class="wp-block-image"><img decoding="async" width="155" height="78" src="https://couchlearn.com/wp-content/uploads/2019/10/image-47.png" alt="Two different types of AI blueprint objects" class="wp-image-932"/></figure>



<h4 class="wp-block-heading">Character</h4>



<p>The character, which is a child of the pawn, has built in multiplayer and singleplayer ready movement, gravity, jumping and crouching via the movement component. <br><br>This also means characters can walk around the level without adding almost any code. <br><a href="https://docs.unrealengine.com/en-US/Gameplay/Framework/Pawn/Character/index.html">To read more about Characters click here.</a></p>



<figure class="wp-block-image"><img decoding="async" width="470" height="39" src="https://couchlearn.com/wp-content/uploads/2019/10/image-49.png" alt="Character blueprint object" class="wp-image-934" srcset="https://couchlearn.com/wp-content/uploads/2019/10/image-49.png 470w, https://couchlearn.com/wp-content/uploads/2019/10/image-49-300x25.png 300w" sizes="(max-width: 470px) 100vw, 470px" /></figure>



<h4 class="wp-block-heading">Pawn</h4>



<p>The pawn is the base class of every AI controlled actor. It has<strong> no built in movement</strong> and does not have gravity or any other features such as crouching or sprinting. <br><a href="https://docs.unrealengine.com/en-US/Gameplay/Framework/Pawn/index.html">To read more about Pawns click here.</a></p>



<figure class="wp-block-image"><img decoding="async" width="465" height="38" src="https://couchlearn.com/wp-content/uploads/2019/10/image-48.png" alt="Pawn blueprint object" class="wp-image-933" srcset="https://couchlearn.com/wp-content/uploads/2019/10/image-48.png 465w, https://couchlearn.com/wp-content/uploads/2019/10/image-48-300x25.png 300w" sizes="(max-width: 465px) 100vw, 465px" /></figure>



<h4 class="wp-block-heading">Which is the best?</h4>



<p><strong>In most cases it is advised to use a Character</strong> as the features are very powerful and makes programming enemies and other AI much easier. <br><br><strong>Characters are setup ready with gravity, walking and pathfinding along meshes and terrain.</strong></p>



<figure class="wp-block-image"><img decoding="async" width="78" height="114" src="https://couchlearn.com/wp-content/uploads/2019/10/image-50.png" alt="Created blueprint character" class="wp-image-935"/></figure>



<p>If you know what you are doing or if you need to make your own specific movement code (flying,  submarine, etc) then the Pawn would be best.  </p>



<h3 class="wp-block-heading">Simple Move to Actor or Location</h3>



<p>The Simple Move to Actor and Simple Move to Location nodes are the easiest way for your character or pawn to move towards an actor or location in the game world.</p>



<figure class="wp-block-image"><img decoding="async" width="205" height="76" src="https://couchlearn.com/wp-content/uploads/2019/10/image-51.png" alt="Simple move to actor and simple move to location blueprint nodes" class="wp-image-936"/></figure>



<p>With a few inputs, this node smoothly moves the actor to the destination. </p>



<p>One downside of this node is that the movement does not give feedback if it failed or is stuck or it had aborted the movement. <br><br>These feedback pins are very important to adjust the behavior of your AI controlled actor. </p>



<h4 class="wp-block-heading">Example</h4>



<p>For this example we used the Simple Move to Location node.<br><br>Completed, the nodes should look like this:</p>



<figure class="wp-block-image size-large"><img decoding="async" width="827" height="330" src="https://couchlearn.com/wp-content/uploads/2020/03/image-1.png" alt="Finished Simple move to location nodes" class="wp-image-1080" srcset="https://couchlearn.com/wp-content/uploads/2020/03/image-1.png 827w, https://couchlearn.com/wp-content/uploads/2020/03/image-1-300x120.png 300w, https://couchlearn.com/wp-content/uploads/2020/03/image-1-768x306.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></figure>



<p>These nodes find a random position in the navigation mesh and moves the AI to it.</p>



<h3 class="wp-block-heading">AI Move to</h3>



<p>In your character or pawn blueprint, add an AI MoveTo node for more advanced movement with more diagnostic features.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="555" height="237" src="https://couchlearn.com/wp-content/uploads/2020/03/image.png" alt="The more robust AI move to node" class="wp-image-1077" srcset="https://couchlearn.com/wp-content/uploads/2020/03/image.png 555w, https://couchlearn.com/wp-content/uploads/2020/03/image-300x128.png 300w" sizes="(max-width: 555px) 100vw, 555px" /></figure>



<p>This node can navigate your AI to either a target actor (any actor in your level) or a destination vector.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="154" height="173" src="https://couchlearn.com/wp-content/uploads/2020/03/image-2.png" alt="AI move to node with input pins" class="wp-image-1085"/></figure>



<p>The AI MoveTo node also allows an acceptance radius which sets how close an AI will move to the actor or destination vector before stopping.<br><br>These execution pins output based on the current state of the AI. <br><br><strong>The top pin will fire after this node is executed.</strong></p>



<figure class="wp-block-image size-large"><img decoding="async" width="279" height="176" src="https://couchlearn.com/wp-content/uploads/2020/03/image-3.png" alt="AI move to execution pins which allows greater debugging" class="wp-image-1086"/></figure>



<h4 class="wp-block-heading">Example</h4>



<figure class="wp-block-image size-large"><img decoding="async" width="797" height="250" src="https://couchlearn.com/wp-content/uploads/2020/03/image-4.png" alt="The finished AI move to nodes" class="wp-image-1087" srcset="https://couchlearn.com/wp-content/uploads/2020/03/image-4.png 797w, https://couchlearn.com/wp-content/uploads/2020/03/image-4-300x94.png 300w, https://couchlearn.com/wp-content/uploads/2020/03/image-4-768x241.png 768w" sizes="(max-width: 797px) 100vw, 797px" /></figure>



<h3 class="wp-block-heading">Conclusion</h3>



<p>Now your new AI controlled character can move around the level!<br><br>Using this setup with additional blueprints you will be able to create more advanced AI with different behaviours.</p>



<h4 class="wp-block-heading">Further Learning</h4>



<p>To make this AI react to your level changing during play <a href="https://couchlearn.com/easy-dynamic-pathfinding-in-unreal-engine-4/">click here to read our guide on dynamic pathfinding in Unreal Engine 4.</a><br><br>For larger open world or procedurally generated levels <a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/">click here to read our guide on optimised pathfinding for Unreal Engine 4.</a><br><br>When creating more advanced AI it is best to begin using <a href="https://docs.unrealengine.com/en-US/Engine/ArtificialIntelligence/BehaviorTrees/index.html">Blackboards and Behaviour Trees.</a></p>
<p>The post <a href="https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/">Easy AI Movement in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/easy-ai-movement-in-unreal-engine-4/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Open World Navigation in Unreal Engine 4</title>
		<link>https://couchlearn.com/open-world-navigation-in-unreal-engine-4/</link>
					<comments>https://couchlearn.com/open-world-navigation-in-unreal-engine-4/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Wed, 11 Dec 2019 20:32:10 +0000</pubDate>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[large world pathfinding]]></category>
		<category><![CDATA[open world pathfinding]]></category>
		<category><![CDATA[terrain pathfinding]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue4 AI]]></category>
		<category><![CDATA[ue4 ai movement]]></category>
		<category><![CDATA[ue4 dynamic pathfinding]]></category>
		<category><![CDATA[ue4 open world]]></category>
		<category><![CDATA[ue4 open world pathfinding]]></category>
		<category><![CDATA[unreal engine 4]]></category>
		<category><![CDATA[unreal engine 4 ai]]></category>
		<category><![CDATA[unreal engine AI]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=939</guid>

					<description><![CDATA[<p>In this guide we will enable open world navigation in Unreal Engine 4 using the Navigation Invoker system. One annoyance that most developers forget to <a class="mh-excerpt-more" href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/" title="Open World Navigation in Unreal Engine 4">[...]</a></p>
<p>The post <a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/">Open World Navigation in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p> In this guide we will enable open world navigation in Unreal Engine 4 using the Navigation Invoker system.<br><br>One annoyance that most developers forget to think about when creating open world or procedural levels is the navigation system taking hours to generate the nav mesh.<br><br>Using navigation invokers, we can generate the nav mesh during runtime without a long wait in the editor.</p>



<h3 class="wp-block-heading">Before we Start</h3>



<p>To enable these features, dynamic pathfinding must be enabled to allow the navigation mesh to generate during runtime.<br><br><a href="https://couchlearn.com/easy-dynamic-pathfinding-in-unreal-engine-4/">To learn how to enable dynamic generation during runtime click here for our guide.</a></p>



<p class="has-text-align-center"><strong>Only the areas of the level that possessed pawns are near will be generated. </strong></p>



<h3 class="wp-block-heading">Enabling Generation around Nav Invokers</h3>



<p>To enable this setting we must firstly go to the project settings.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="560" height="477" src="https://couchlearn.com/wp-content/uploads/2019/11/image.png" alt="Project settings" class="wp-image-944" srcset="https://couchlearn.com/wp-content/uploads/2019/11/image.png 560w, https://couchlearn.com/wp-content/uploads/2019/11/image-300x256.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></figure>



<p>Once the project settings are open, click on the<strong> Navigation System</strong> tab.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="278" height="402" src="https://couchlearn.com/wp-content/uploads/2019/11/image-1.png" alt="Navigation system" class="wp-image-945" srcset="https://couchlearn.com/wp-content/uploads/2019/11/image-1.png 278w, https://couchlearn.com/wp-content/uploads/2019/11/image-1-207x300.png 207w" sizes="(max-width: 278px) 100vw, 278px" /></figure>



<p>Tick the checkbox named: <strong>Generate Navigation Only Around Navigation Invoker. </strong><br><br>This tells the engine to only generate around actors that have the navigation invoker component.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="743" height="472" src="https://couchlearn.com/wp-content/uploads/2019/11/image-2.png" alt="Enable nav invoker generation" class="wp-image-946" srcset="https://couchlearn.com/wp-content/uploads/2019/11/image-2.png 743w, https://couchlearn.com/wp-content/uploads/2019/11/image-2-300x191.png 300w" sizes="(max-width: 743px) 100vw, 743px" /></figure>



<h3 class="wp-block-heading">Nav Invoker Component</h3>



<p>To enable navigation generation on an actor, we first need to add the Navigation Invoker Component.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="282" height="140" src="https://couchlearn.com/wp-content/uploads/2019/11/image-3.png" alt="Nav invoker component" class="wp-image-948"/></figure>



<p>To add this to your actor, click the Add Component button in the top left of your blueprint editor and search for Navigation Invoker.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="361" height="145" src="https://couchlearn.com/wp-content/uploads/2019/11/image-4.png" alt="Adding the nav invoker" class="wp-image-949" srcset="https://couchlearn.com/wp-content/uploads/2019/11/image-4.png 361w, https://couchlearn.com/wp-content/uploads/2019/11/image-4-300x120.png 300w" sizes="(max-width: 361px) 100vw, 361px" /></figure>



<p>Once this component is added, setup the radius that the navigation mesh will be generated and removed.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="287" height="169" src="https://couchlearn.com/wp-content/uploads/2019/11/image-5.png" alt="Adding the nav invoker" class="wp-image-950"/></figure>



<p>From my testing, the default values work well for open world landscape levels.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="544" height="334" src="https://couchlearn.com/wp-content/uploads/2019/11/image-6.png" alt="Default settings for nav invoker" class="wp-image-951" srcset="https://couchlearn.com/wp-content/uploads/2019/11/image-6.png 544w, https://couchlearn.com/wp-content/uploads/2019/11/image-6-300x184.png 300w" sizes="(max-width: 544px) 100vw, 544px" /></figure>



<p>When creating a procedurally generated indoor level, I recommend slightly higher values.<br><br>This prevents the actor from being trapped in their current room or area.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="533" height="88" src="https://couchlearn.com/wp-content/uploads/2019/11/image-7.png" alt="Settings for procedural halls" class="wp-image-952" srcset="https://couchlearn.com/wp-content/uploads/2019/11/image-7.png 533w, https://couchlearn.com/wp-content/uploads/2019/11/image-7-300x50.png 300w" sizes="(max-width: 533px) 100vw, 533px" /></figure>



<h3 class="wp-block-heading">Demonstration and Example Files</h3>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed" data-gumroad-product-id="tTeLu"><a href="https://gumroad.com/l/tTeLu">Loading&#8230;</a></div>



<h3 class="wp-block-heading">Conclusion</h3>



<p>That is all for enabling open world navigation in Unreal Engine 4!<br><br>Characters and pawns can now traverse large open or procedurally generated levels.<br><br>For further reading into the navigation functions in Unreal Engine, <a href="https://docs.unrealengine.com/en-US/BlueprintAPI/AI/Navigation/index.html">click here for the official documentation.</a></p>
<p>The post <a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/">Open World Navigation in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/open-world-navigation-in-unreal-engine-4/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: couchlearn.com @ 2026-04-17 02:51:41 by W3 Total Cache
-->