How to Smoothly move First Person Character to target location from any starting point with obstacle avoidance

Hi everyone,

I’m working on a project in UE5 using Blueprints only, and I need help with moving my FirstPersonCharacter from any starting position to a targeted location (like a room or area), with the following

  1. The FPC should move smoothly and not teleport.
  2. It should avoid obstacles like walls and furniture i.e., follow the correct navigation path.
  3. The starting location can be anywhere on the map.
  4. The movement is triggered by clicking a UI button.

I’ve tried using SimpleMoveToLocation and spline-based movement, but the character sometimes moves directly into obstacles or doesn’t find the correct path if not already near the spline.

What is the recommended approach to achieve this kind of movement?
If anyone has a working Blueprint setup or can point me to the right nodes/workflow, I’d really appreciate it.

Thanks in advance!

The below is a tutorial for item pickups, which uses the very logic you’re seeking to navigate to the items:

Pick-Up Items at Different Heights Unreal Engine

The key takeaways are the functions below:






i tried this but it’s not working,i am not quite experienced with macros and functions so can you please guide me where i am wrong




also i got this in my output log when i click on the ui button to move my BP_FPC to the location

LogScript: Warning: Script Msg: Attempted to access index -1 from array ‘PathPoints’ of length 0 in ‘/Script/NavigationSystem.NavigationPath’!
LogScript: Warning: Script Msg called by: BP_FirstPersonCharacter_C

I misunderstood your initial request; what I provided was a way to move to an object in line of sight. What you need is AI query abilities on your character.

For that you need an AI setup–AI controller, Navmesh (which I believe you may not have, thus your error), and Behavior Tree. Find an AI tutorial below:

Smart Enemy AI | (Part 1: Behavior Trees) | Tutorial in Unreal Engine 5 (UE5)

Then, allow your character to be possessed by the AI controller and make it pursue/locate/investigate the point of interest or item you want it to reach. See below:

How to have a character uncontrolled and possess by an AI controller? - Programming & Scripting / AI - Epic Developer Community Forums

Alternatively, you could just create a spline and make your character follow that predetermined path to the goal:

How to Move a Character Along a Spline in Unreal Engine 5

i tried using ai move to in which i believe the player gets possessed by ai controller but my BP_FirstPersonCharacter didnt move does it not work for it?
and i also have nav mesh in my scene and i tried with the spline method and was able to move from my starting location being anywhere to the targeted location but due to collisions (walls and doors) i used to get stuck

If you take a look at the AI tutorial I posted; the AIs find the player, while navigating obstacles, so I know it works. The same series goes over patrol paths (splines), which would do the same more consistently.

i saw the tutorials but couldnt really find anything that helps with what i want