<?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>ue ai follow player Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/tag/ue-ai-follow-player/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/tag/ue-ai-follow-player/</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>ue ai follow player Archives - Couch Learn</title>
	<link>https://couchlearn.com/tag/ue-ai-follow-player/</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>
	</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-10 03:29:26 by W3 Total Cache
-->