AI Move To alternative for making the AI rotate toward something

I want the AI to walk across patrol points, which I have working, but then he needs to rotate towards the rotator of the patrol point, I can use move component to, but that just makes him slide towards the wanted rotator.

How can I make the AI walk in place and rotate towards the wanted location?

I am using ALS v4 as locomotion system.

Clarification:
There are 2 main issues, the first one is that the AI needs to rotate towards where the arrows are pointing but I don’t know how to get him to do that

Here is a video of the AI rotating to walk towards a point but just sliding instead of walking in place.

Hi there,
It might be caused by your character movement component settings.
Set Orient Rotation to Movement to True
Set Use Controller Rotation Yaw to False

Here is a video with an example at time approx 38:30, you may need to watch the full video to see other settings.

1 Like

Hey @MrGoatsy! Sounds like you’re using a character movement component and the AI moveto node correctly just a couple of things you have to tick off then you’ll be golden. So I’ll address each concern individually.

1: to orient the player while moving, check off this box in the character movement component.
image

  1. You can actually rotate the component under its rotation settings there from BP as well.

  2. For walking anims, you’ll need to have those done for the character already, but you can follow this tutorial around Time: 45:25 to implement them. (and if you go a bit back you can also see how they set up the character movement controller). Your First Game In Unreal Engine 5 | Tutorial

Let me know if all this helps!

1 Like

I edited the OP.

Oh I see, ALS gotcha. I haven’t used the plugin myself so I’ll have to take a look at how they handle it in their blueprints. I’ll do a quick read and see what I can find.

1 Like

Thanks.

Alright, so I couldn’t find decent documentation for the plugin so I dug into it myself. Looks like the project’s base character out of the box has the rotational component set up already, so are you deriving from ALS_Base_CharacterBP?
image

If so check in the Update Grounded Rotation function, it has a couple of bools that are determined in other functions.


Here’s where the actual movement update is taking place, it relies on the turn in place animations that are set up. I hadn’t had time to test set up a character for it as of yet but this is where the magic happens for rotations. Will update you as I pick things apart.

It is worth noting that I am using this version of ALS v4:

It is probably mostly the same.

Hrm, so the base character (where you’d usually start with when making a new ALS character) does have this natively done out of the box for rotations. When you started work on your character did you derive from the base or from the AnimMan BP? You should be able to work from either, especially since AnimMan is set up and ready for retargeting, but the base is going to require tying your own anims in 100%. That said the rotation should be working on both out of the box so I might need more insight on your specific situation.
image

If you’ve used either of these and the rotations aren’t happening naturally, check in the console and see if there are any errors.
2022-08-09_20-50-04

I am using the AnimMan bp, or a child of it at least for AI.

The player character rotates fine, it has no issues whatsoever with that.

I need the AI to rotate towards the directions the arrows of these path points are pointing:


As you can see here, he doesn’t walk rotate in place, he just slides to the wanted rotation:
https://streamable.com/crmefx

It is even more obvious when you you make him take longer to rotate:
https://streamable.com/ksuo6l

This is the used blueprint:

1 Like

Did you ever figure it out?

Hey there @MrGoatsy! Sorry about that! I actually never did figure it out. ALS is a little more dense than I expected off the bat so I started a project to learn a bit more about the workflow and don’t think I ever got to an answer.

Oke, thanks for trying anyway.