Motion Matching Pose Search Schema Settings for Strafing

Hi, I have a collection of animations that all have the root bone facing the same direction, but moving in different directions, for strafing around a character while aiming at them.

I’m having trouble getting them to choose the walk 45/135 animations. They will either walk left or forward, not left 45.

Is that something in the Pose Search Schema to prioritize velocity vs facing direction or something like that? Does anyone have any insights into what might be the issue?

Are you using the sample project? I’m not really familiar with those samples as there are many things that are already set. So it’s hard to apply desired changes while there’s so much going on in the background. But I can explain how it normally works, which I recommend you tinkering with, as you’ll need to have a comprehensive grasp on the topic when you’ll want to implement them to your custom characters.

Now, when you enable your character to move around in every direction freely and make it so that it faces the movement direction at all times, the forward moving animations are all you need. But when you want your character’s body to be facing to a certain direction, you would need to either get it’s velocity’s direction or the movement input’s direction to determine when to play those forward, right, back, cross movement animations. Like you already mentioned, you can achieve determining when to play those cross movement animations by getting the velocity direction and checking if it’s in between 22,5 and 67,5 degrees compared to the character’s forward vector. Or you can get the movement input’s direction and compare it the same way, which could be beneficial if you want those animations to show up even if your character can’t move (therefore the velocity is 0) so that you can still have that feeling of it trying to move towards a certain direction.

You can try implementing these cross animations manually using this method but it may not work as I said earlier, since there might be other things that could overwrite them. I’m sorry if I couldn’t provide you anything new, you already seem to know how to solve this problem yourself and I see you just wanted to understand the root problem. But I hope I could make you view this topic from a different perspective! :smiling_face_with_three_hearts:

I appreciate the reply! I’m not using the anim sample. I reworked a traditional blendspace animation system into a motion matching system over the course of a few weeks using the same animations. It all works and plays well with the player, but the AI don’t want to choose the diagonal strafing animations.

With what you described, are you talking about a manual implementation of choosing animations or something the setting in the schema would dictate? I’ve been trying different settings for most of the day and still not having any luck.

Thank you for the insight, though.

For example - I would imagine that this being the only channel for choosing the animations SHOULD result in the diagonals being played, but doesn’t. I know it’s probably just a matter of finding the right values, but the lack of proper documentation on this system is really frustrating.
image

Sure there can be more classy ways to achieve this, what I’ve described is one of the simplest solutions. If you’re struggling, I recommend doing that, keeping improving your project and looking back at this problem if you want to get more professional. But I must say, there will be no noticable performance wise difference between that way and making those settings work. It would certainly look cool and keep your project more organized though :wink:

Btw if you want to cover all angles and not just 8 of them, and that’s why you wanna implement that, you can also make it work using control rigs