Hi, I am new at using unreal engine, and i would like to ask is there is way to make a character (like the first person) choose which path to take.
So for example, the character would like to go to a destination, in key press a widget would appear and there would be three choices on which path to take. If the character chooses one then it would automatically move (specifically walk) to the destination?
I would also like to ask for how to do the auto pathing using blueprints.
seems easy enough, youll need are a widget with 3 buttons and have each button on click use a ai move to for the character. to do the script part you will also need a reference to the character but that can easily be gotten via the get player character node. if you want the character to walk and not run then you may also need to adjust the max walk speed in the movement component of the character. this method uses the pathing system built into the engine so no need to worry about that, you just need to add a nav mesh bounds volume to the level.
with the system described above you can make it as specific or as modular as you like so that it can be reused in many places throughout the game.
I thought the move to function is for AI spawns only, i did not know that it can be used to the player. So i searched for an alternative and found spline. What is the difference between spline and move to ? and what is easier to implement ?
Move to require nav mesh and environment that your character can move from current position to the destination, aka ground and enough space to move.
Spline is a line that you can manually draw in the editor, and when combine with blueprint code, the result is that you can direct your character to walk whichever direction you want.
The first method is calculated and handle by engine, you only have to worry about the nav mesh and environment. The second is purely manually labor task.
Ah so move to is easier since the engine will calculate the path. So to be clear, i can use the AI simple move to location to make the first person character walk to the specified destination?
Yep, you can take a look at TopDown template to get a hang of the set up for nav mesh and MoveTo function, on the side note you should also consider disable player input while your character are moving to the destination.