# AI

**URL:** https://forums.unrealengine.com/c/development-discussion/programming-scripting/ai/128.md?page=20

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

**Page:** 21

---

## [change a variable in receive abort ai, but the next task dont read this variables](https://forums.unrealengine.com/t/change-a-variable-in-receive-abort-ai-but-the-next-task-dont-read-this-variables/1890373)

<div class="topic-metadata">

**Author:** [@HernanAcks](https://forums.unrealengine.com/u/HernanAcks)\
**Replies:** 1\
**Last updated:** [June 5, 2024, 1:14pm UTC](https://forums.unrealengine.com/t/change-a-variable-in-receive-abort-ai-but-the-next-task-dont-read-this-variables/1890373 "2024-06-05T13:14:50Z")

</div>

I have a selector with 2 tasks, in the first I implement an abort event where I set a variable to true, in the second task I have a decorator that reads that variable and executes if it is true, but takes it as false, th…

---

## [How to maintain constant height above the mesh? (FloatingPawnMovement)](https://forums.unrealengine.com/t/how-to-maintain-constant-height-above-the-mesh-floatingpawnmovement/1889433)

<div class="topic-metadata">

**Author:** [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Replies:** 5\
**Last updated:** [June 4, 2024, 7:25pm UTC](https://forums.unrealengine.com/t/how-to-maintain-constant-height-above-the-mesh-floatingpawnmovement/1889433 "2024-06-04T19:25:52Z")

</div>

I’m experimenting with floating movement for the first time. The pawn finds paths above the navigation mesh. It is okay. The problem is when it goes up ramps then it is not able to go down them. It stays still in the …

---

## [How can I get my AI to walk around character?](https://forums.unrealengine.com/t/how-can-i-get-my-ai-to-walk-around-character/307560)

<div class="topic-metadata">

**Author:** [@AttemptD](https://forums.unrealengine.com/u/AttemptD)\
**Replies:** 7\
**Last updated:** [June 3, 2024, 8:19pm UTC](https://forums.unrealengine.com/t/how-can-i-get-my-ai-to-walk-around-character/307560 "2024-06-03T20:19:45Z")

</div>

I’ve got my simple AI skeleton enemy hear. The nav mesh is set up and I’ve got him to so a simple move to actor once a certain trigger is set. I have another trigger for when I get close. An animation makes him get down…

---

## [How to stop "Move to and Use Smart Object"?](https://forums.unrealengine.com/t/how-to-stop-move-to-and-use-smart-object/1884564)

<div class="topic-metadata">

**Author:** [@Elgatee](https://forums.unrealengine.com/u/Elgatee)\
**Replies:** 1\
**Last updated:** [June 2, 2024, 7:26pm UTC](https://forums.unrealengine.com/t/how-to-stop-move-to-and-use-smart-object/1884564 "2024-06-02T19:26:41Z")

</div>

Greetings, I have a Move to and Use Smart Object with Gameplay Behavior link in one of my tasks. I use these smart object to setup points where AI goes and interact with random stuff. The AI is supposed to go after the…

---

## [Chasing AI character only changes speed once it has reached player character](https://forums.unrealengine.com/t/chasing-ai-character-only-changes-speed-once-it-has-reached-player-character/1885347)

<div class="topic-metadata">

**Author:** [@Glowingpumpkin](https://forums.unrealengine.com/u/Glowingpumpkin)\
**Replies:** 1\
**Last updated:** [June 2, 2024, 3:18pm UTC](https://forums.unrealengine.com/t/chasing-ai-character-only-changes-speed-once-it-has-reached-player-character/1885347 "2024-06-02T15:18:30Z")

</div>

SOLVED I’ve built an AI character that moves to random reachable points in radius, it chases the player using a behaviour tree and AI controller with sight sense. Within the behaviour tree I’ve added two speed tasks, o…

---

## [BTTask MoveTo -\> actor always fails in Lyra 5.4](https://forums.unrealengine.com/t/bttask-moveto-actor-always-fails-in-lyra-5-4/1880523)

<div class="topic-metadata">

**Author:** [@Astaraa](https://forums.unrealengine.com/u/Astaraa)\
**Replies:** 3\
**Last updated:** [May 31, 2024, 6:00pm UTC](https://forums.unrealengine.com/t/bttask-moveto-actor-always-fails-in-lyra-5-4/1880523 "2024-05-31T18:00:06Z")

</div>

Red line indicates although target actor is set, task fails to move to it. Target actor is Object of base class Actor. MoveTo → vector works for default Lyra bot behavior but fails in other tests which is one of the…

---

## [Error During Project Build: Ensure Condition Failed in Unreal Engine 5's BTDecorator\_BlueprintBase and BTFunctionLibrary](https://forums.unrealengine.com/t/error-during-project-build-ensure-condition-failed-in-unreal-engine-5s-btdecorator-blueprintbase-and-btfunctionlibrary/1882378)

<div class="topic-metadata">

**Author:** [@ARIANK0076](https://forums.unrealengine.com/u/ARIANK0076)\
**Replies:** 1\
**Last updated:** [May 31, 2024, 12:56pm UTC](https://forums.unrealengine.com/t/error-during-project-build-ensure-condition-failed-in-unreal-engine-5s-btdecorator-blueprintbase-and-btfunctionlibrary/1882378 "2024-05-31T12:56:39Z")

</div>

I’m getting this error every time I build my project, I didn’t get this error before today, does anyone know anything about it? In Editor: Error: Ensure condition failed: ObservedKeyNames.Num() \> 0 \[File:D:\\build\\++UE5…

---

## [【UE5.4 AI行为树系统BUG反馈】帖子](https://forums.unrealengine.com/t/ue5-4-ai-bug/1879412)

<div class="topic-metadata">

**Author:** [@user\_f1513f4c9aa2ae6839bf556eb2f10e7e14efde8c1535778a4470c9](https://forums.unrealengine.com/u/user_f1513f4c9aa2ae6839bf556eb2f10e7e14efde8c1535778a4470c9)\
**Replies:** 0\
**Last updated:** [May 29, 2024, 5:25pm UTC](https://forums.unrealengine.com/t/ue5-4-ai-bug/1879412 "2024-05-29T17:25:48Z")

</div>

我在制作AI行为树时，尝试制作一个飞行怪物，我发现MoveDirectlyToward此节点有BUG，当我使用向量作为最终达到的位置时，他会出现严重偏差，而且经常会失效，当我使用actor当作最终达到位置时，他则不会出现偏差，还请官方人员尽快检查优化BUG问题，并且我在使用5.4时闪退非常严重，经常莫名其妙闪退。

---

## [Find Path to Location Synchronously not returning the path points UE5](https://forums.unrealengine.com/t/find-path-to-location-synchronously-not-returning-the-path-points-ue5/254769)

<div class="topic-metadata">

**Author:** [@DevDad](https://forums.unrealengine.com/u/DevDad)\
**Replies:** 1\
**Last updated:** [May 29, 2024, 2:58pm UTC](https://forums.unrealengine.com/t/find-path-to-location-synchronously-not-returning-the-path-points-ue5/254769 "2024-05-29T14:58:41Z")

</div>

Hey guys, does anyone have issue with Find Path to Location Synchronously not returning the path points, so always returns length 0, but path is not Null ? In the same time, MoveTo for same destination works fine. I fou…

---

## [Get Path Length - Inconsistent Results](https://forums.unrealengine.com/t/get-path-length-inconsistent-results/285948)

<div class="topic-metadata">

**Author:** [@Nemecys](https://forums.unrealengine.com/u/Nemecys)\
**Replies:** 8\
**Last updated:** [May 29, 2024, 8:56am UTC](https://forums.unrealengine.com/t/get-path-length-inconsistent-results/285948 "2024-05-29T08:56:49Z")

</div>

Hi, Currently setting up a Behaviour tree and trying to put in a few IF’s or AND’s statements to try and control the AI’s behaviour, I am finding that the “Get Path Length” node is behaving slightly randomly and sometim…

---

## [How to update A NavMeshBoundsVolume At Runtime](https://forums.unrealengine.com/t/how-to-update-a-navmeshboundsvolume-at-runtime/1874592)

<div class="topic-metadata">

**Author:** [@KinGxSeGaL1](https://forums.unrealengine.com/u/KinGxSeGaL1)\
**Replies:** 0\
**Last updated:** [May 27, 2024, 1:05am UTC](https://forums.unrealengine.com/t/how-to-update-a-navmeshboundsvolume-at-runtime/1874592 "2024-05-27T01:05:41Z")

</div>

I have a navmesh bounds volume in my level that is set to dynamic. I have a platform that moves from one end of the volume to the other. However, when i do show navigation the navmesh is red and AI cannot move on it. Is …

---

## [how to handle multi-attack animations with cooldown in behavior tree](https://forums.unrealengine.com/t/how-to-handle-multi-attack-animations-with-cooldown-in-behavior-tree/1874152)

<div class="topic-metadata">

**Author:** [@user\_3efc87921bcb4110447d2e17e4d7044ea0722e55da9367bcdafdd8](https://forums.unrealengine.com/u/user_3efc87921bcb4110447d2e17e4d7044ea0722e55da9367bcdafdd8)\
**Replies:** 2\
**Last updated:** [May 26, 2024, 9:42pm UTC](https://forums.unrealengine.com/t/how-to-handle-multi-attack-animations-with-cooldown-in-behavior-tree/1874152 "2024-05-26T21:42:39Z")

</div>

i have 3 attack animations, each planed to have different cooldown time, when all attack is in cooldown, the ai will go to defend mode, like strafing around player, hiding things. i can create 3 sequence before defend, …

---

## [how to use “move to location” node?](https://forums.unrealengine.com/t/how-to-use-move-to-location-node/1872960)

<div class="topic-metadata">

**Author:** [@baobao4435](https://forums.unrealengine.com/u/baobao4435)\
**Replies:** 2\
**Last updated:** [May 26, 2024, 3:00am UTC](https://forums.unrealengine.com/t/how-to-use-move-to-location-node/1872960 "2024-05-26T03:00:02Z")

</div>

hi,I discovered this node,which can move an AI without a navmesh. I don’t know how to check when it is finished(reached target location). it doesn’t have on finished pin.

---

## [Why does Move to Location work without a NavMesh but Move To Location or Actor doesn't](https://forums.unrealengine.com/t/why-does-move-to-location-work-without-a-navmesh-but-move-to-location-or-actor-doesnt/581012)

<div class="topic-metadata">

**Author:** [@Anthony-Mostly-Harm1](https://forums.unrealengine.com/u/Anthony-Mostly-Harm1)\
**Replies:** 2\
**Last updated:** [May 26, 2024, 2:36am UTC](https://forums.unrealengine.com/t/why-does-move-to-location-work-without-a-navmesh-but-move-to-location-or-actor-doesnt/581012 "2024-05-26T02:36:26Z")

</div>

Hi, I am trying to get a unit to move from where it is to where the player clicks on Hex Grid. I don’t need the NavMeshBoundsVolume as I already derive the correct path with an A\* algorithm. The problem I have is when …

---

## [AI Issue](https://forums.unrealengine.com/t/ai-issue/1872888)

<div class="topic-metadata">

**Author:** [@Chisinn](https://forums.unrealengine.com/u/Chisinn)\
**Replies:** 0\
**Last updated:** [May 25, 2024, 7:19pm UTC](https://forums.unrealengine.com/t/ai-issue/1872888 "2024-05-25T19:19:15Z")

</div>

I made a simple AI using an “AI MoveTo” node that never seems to call the function “On Success” even though the Ai successfully made it to the targetpoint location. I would appreciate any help with this since I’ve …

---

## [Task wait delay never finishing](https://forums.unrealengine.com/t/task-wait-delay-never-finishing/431719)

<div class="topic-metadata">

**Author:** [@Numisi](https://forums.unrealengine.com/u/Numisi)\
**Replies:** 8\
**Last updated:** [May 25, 2024, 3:45pm UTC](https://forums.unrealengine.com/t/task-wait-delay-never-finishing/431719 "2024-05-25T15:45:39Z")

</div>

Hello everyone! I started yesterday using behaviour trees, after watching a good deal of tutorials. All looks neat and functional but I have had an inexplicable problem: making custom tasks, the “Task Wait Delay” node n…

---

## [Is there a way to set the cost of the navigation mesh based on the pawn direction?](https://forums.unrealengine.com/t/is-there-a-way-to-set-the-cost-of-the-navigation-mesh-based-on-the-pawn-direction/1871628)

<div class="topic-metadata">

**Author:** [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Replies:** 0\
**Last updated:** [May 24, 2024, 11:30pm UTC](https://forums.unrealengine.com/t/is-there-a-way-to-set-the-cost-of-the-navigation-mesh-based-on-the-pawn-direction/1871628 "2024-05-24T23:30:22Z")

</div>

I have this situation. When the pawn walks in the direction of ground movement the cost is very small. When the pawn walks in the opposite direction of the ground movement the cost is very big. I would lik…

---

## ["AI Move To" on a player character?](https://forums.unrealengine.com/t/ai-move-to-on-a-player-character/359489)

<div class="topic-metadata">

**Author:** [@simkas](https://forums.unrealengine.com/u/simkas)\
**Replies:** 8\
**Last updated:** [May 24, 2024, 9:59pm UTC](https://forums.unrealengine.com/t/ai-move-to-on-a-player-character/359489 "2024-05-24T21:59:02Z")

</div>

I’m trying to get my player character to automatically walk to a certain spot after a specific input and with the “Simple Move To” nodes, it never actually properly reaches the target location. I’m assuming that’s simply…

---

## [UE5.4.1 -\> Stack On Service (Opening behavior tree for the first time)](https://forums.unrealengine.com/t/ue5-4-1-stack-on-service-opening-behavior-tree-for-the-first-time/1862583)

<div class="topic-metadata">

**Author:** [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Replies:** 1\
**Last updated:** [May 24, 2024, 6:18am UTC](https://forums.unrealengine.com/t/ue5-4-1-stack-on-service-opening-behavior-tree-for-the-first-time/1862583 "2024-05-24T06:18:42Z")

</div>

This happens when I open the behavior tree for the first time. It is a service made in C++. I have been using this service for months and had not problems before (Or I haven’t realized until today). It’s the fir…

---

## [Large sections of Nav Mesh getting wiped by dynamic obstacles.](https://forums.unrealengine.com/t/large-sections-of-nav-mesh-getting-wiped-by-dynamic-obstacles/1870151)

<div class="topic-metadata">

**Author:** [@JPrecache](https://forums.unrealengine.com/u/JPrecache)\
**Replies:** 0\
**Last updated:** [May 24, 2024, 2:16am UTC](https://forums.unrealengine.com/t/large-sections-of-nav-mesh-getting-wiped-by-dynamic-obstacles/1870151 "2024-05-24T02:16:46Z")

</div>

This is an image of two identical turrets. The both have collision spheres set to be dynamic obstacles (the red circle around the base) but the one on the left wipes a large portion of the nav mesh as well. And here …

---

## [Access violation when using AI Hearing Perception \[C++\]](https://forums.unrealengine.com/t/access-violation-when-using-ai-hearing-perception-c/458799)

<div class="topic-metadata">

**Author:** [@Mr.Pathetic](https://forums.unrealengine.com/u/Mr.Pathetic)\
**Replies:** 4\
**Last updated:** [May 23, 2024, 6:18pm UTC](https://forums.unrealengine.com/t/access-violation-when-using-ai-hearing-perception-c/458799 "2024-05-23T18:18:42Z")

</div>

I’m trying to use the AI Perception component but I’m getting a seemingly random error when trying to access my USenseConfig\_Hearing object. This is my code: AHumanAIController:AHumanAIController() { AIPerceptionCo…

---

## [Forcing Ai to go back to nav mesh when leaves it](https://forums.unrealengine.com/t/forcing-ai-to-go-back-to-nav-mesh-when-leaves-it/608750)

<div class="topic-metadata">

**Author:** [@Lamaral14](https://forums.unrealengine.com/u/Lamaral14)\
**Replies:** 20\
**Last updated:** [May 23, 2024, 10:00am UTC](https://forums.unrealengine.com/t/forcing-ai-to-go-back-to-nav-mesh-when-leaves-it/608750 "2024-05-23T10:00:17Z")

</div>

This is kinda hard to explain why i need it but is there any way to make Ai character move back to nearest location of the navigation mesh? for exemple imagine there is a planar non nav mesh area (restricted with nav mod…

---

## [Is it actually possible to stop the behavior tree from C++?](https://forums.unrealengine.com/t/is-it-actually-possible-to-stop-the-behavior-tree-from-c/1863073)

<div class="topic-metadata">

**Author:** [@Sen3D](https://forums.unrealengine.com/u/Sen3D)\
**Replies:** 4\
**Last updated:** [May 21, 2024, 3:21pm UTC](https://forums.unrealengine.com/t/is-it-actually-possible-to-stop-the-behavior-tree-from-c/1863073 "2024-05-21T15:21:57Z")

</div>

I made a pool for my enemy NPCs. When returning them to the pool I’m deactivating everything. Everything works except stopping the Behavior Tree. The tree is still simulating, running and showing up in the debug panel. B…

---

## [Stuck on basic State Tree (again)](https://forums.unrealengine.com/t/stuck-on-basic-state-tree-again/1846607)

<div class="topic-metadata">

**Author:** [@6to9Games](https://forums.unrealengine.com/u/6to9Games)\
**Replies:** 3\
**Last updated:** [May 19, 2024, 4:16pm UTC](https://forums.unrealengine.com/t/stuck-on-basic-state-tree-again/1846607 "2024-05-19T16:16:20Z")

</div>

Hi there. I have tried State Trees for AI stuff in 5.2 & 5.3 and wanted to try doing more complicated things with them now in 5.4.1. But somehow I am currently stuck at the very beginning and I have no clue why. I hav…

---

## [Is it possible to find the shortest path using teleport points? (finding paths)](https://forums.unrealengine.com/t/is-it-possible-to-find-the-shortest-path-using-teleport-points-finding-paths/1854812)

<div class="topic-metadata">

**Author:** [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Replies:** 2\
**Last updated:** [May 16, 2024, 3:23pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-find-the-shortest-path-using-teleport-points-finding-paths/1854812 "2024-05-16T15:23:48Z")

</div>

The idea is simple, make the AI teleport from point A to point B. Using the blue circle as the input and the red circle as the output, since the brown path is actually the shortest path and the green path is the longest. …

---

## [A moving NPC can't bypass a standing one, but is trying to move through him](https://forums.unrealengine.com/t/a-moving-npc-cant-bypass-a-standing-one-but-is-trying-to-move-through-him/440974)

<div class="topic-metadata">

**Author:** [@SumbodySumwher](https://forums.unrealengine.com/u/SumbodySumwher)\
**Replies:** 4\
**Last updated:** [May 14, 2024, 8:20pm UTC](https://forums.unrealengine.com/t/a-moving-npc-cant-bypass-a-standing-one-but-is-trying-to-move-through-him/440974 "2024-05-14T20:20:08Z")

</div>

Basically, my NPCs that need to attack me at melee range are too dumb to bypass each other. If one is attacking me, the other one behind him seems to be unaware and will forever keep colliding with him on his path to rea…

---

## [Rotate to face BB entry very fast](https://forums.unrealengine.com/t/rotate-to-face-bb-entry-very-fast/506408)

<div class="topic-metadata">

**Author:** [@i\_Byte](https://forums.unrealengine.com/u/i_Byte)\
**Replies:** 3\
**Last updated:** [May 14, 2024, 4:23pm UTC](https://forums.unrealengine.com/t/rotate-to-face-bb-entry-very-fast/506408 "2024-05-14T16:23:47Z")

</div>

Rotate to face BB entry rotates NPC very fast. How to fix it?

---

## [State Tree Delay Task not working](https://forums.unrealengine.com/t/state-tree-delay-task-not-working/1369359)

<div class="topic-metadata">

**Author:** [@LuisMini](https://forums.unrealengine.com/u/LuisMini)\
**Replies:** 3\
**Last updated:** [May 14, 2024, 4:23pm UTC](https://forums.unrealengine.com/t/state-tree-delay-task-not-working/1369359 "2024-05-14T16:23:05Z")

</div>

Hello, I’ve recently started messing around with State Trees, I was trying to implement a common example I’ve done many times with BTs which consists in: Agent Finds random position Agent moves to the found position Ag…

---

## [Data flow of tasks in State Trees](https://forums.unrealengine.com/t/data-flow-of-tasks-in-state-trees/1855758)

<div class="topic-metadata">

**Author:** [@6to9Games](https://forums.unrealengine.com/u/6to9Games)\
**Replies:** 0\
**Last updated:** [May 14, 2024, 2:50pm UTC](https://forums.unrealengine.com/t/data-flow-of-tasks-in-state-trees/1855758 "2024-05-14T14:50:08Z")

</div>

Hello there, I have a questiona bout the data flow and the availability of that data in a state tree. For this I refer to this article / documentation page. In it we see this example: The selector state (“Smart O…

---

## [Behaviour Tree Cooldown Decorator locks out task indefinitly](https://forums.unrealengine.com/t/behaviour-tree-cooldown-decorator-locks-out-task-indefinitly/385219)

<div class="topic-metadata">

**Author:** [@Dinomannen](https://forums.unrealengine.com/u/Dinomannen)\
**Replies:** 4\
**Last updated:** [May 14, 2024, 2:23am UTC](https://forums.unrealengine.com/t/behaviour-tree-cooldown-decorator-locks-out-task-indefinitly/385219 "2024-05-14T02:23:31Z")

</div>

I have a simple parallel running a main task (move to) with a task blueprint running in the background. The background task loops by itself on completion, however since the task is completed very fast it loops to often. …

[Previous page](https://forums.unrealengine.com/c/development-discussion/programming-scripting/ai/128.md?page=19)

[Next page](https://forums.unrealengine.com/c/development-discussion/programming-scripting/ai/128.md?page=21)
