<?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>AI Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/tag/ai/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/tag/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.9.4</generator>

<image>
	<url>https://couchlearn.com/wp-content/uploads/2020/05/cropped-logolarge-32x32.png</url>
	<title>AI Archives - Couch Learn</title>
	<link>https://couchlearn.com/tag/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>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: couchlearn.com @ 2026-06-07 07:13:57 by W3 Total Cache
-->