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.
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.
You can actually rotate the component under its rotation settings there from BP as well.
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
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.
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?
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.
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.
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.
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.