Download

Getting AI to use the same movement as the player

I’ve been working on movement for a horse character, and I’m having some trouble with it. I couldn’t figure out how to achieve quite what I wanted with the normal Rotation Speed in the character movement component, so instead I set up a turning system where the horse always moves toward a scene component “rotation target”, and right/left input is directed toward rotating this target around the horse instead of rotating the horse itself. This works great for the player, resulting in smoother, more natural turns, but when I used AIMoveTo to see how it looked on NPCs, I found that the AI doesn’t use the target at all, and accesses standard right/left input that the player can’t.

Does anyone have any ideas on getting the AI to use the same rotation that the player does? I also feel like I may be going about this wrong, so if anyone has any ideas to point me in the right direction, that would also be appreciated. I haven’t been able to find much on quadruped movement, so general resources there would be good, too.

Hey let me know if you find any thing been looking for months for quadruped movement Blend spaces and there is none to be found was told you need to make your own with trial and error. But let me know if you come across any thing I myself need it for my survival game with all the animals I have.

so 2 ways of rotating:

  1. in place - here is just basic actor rotation and a looping animation
  2. while moving - this is similar to a car movement and you need to multiply the rotation amount with fraction of forward movement

Sure, will do. I didn’t have any trouble with blendspaces specifically, though; mine’s a pretty straightforward speed vs rotation, works pretty well (though I really need to sit down and adjust the speeds).

I’m not sure I understand the relevance? I have the rotation worked out pretty well for the player character, it’s just that I can’t get the AI to use it. Unless you’re suggesting a different way to do it? Could you clarify?

i was suggesting to fake it.
if you cant get it to work with ai move to and dont have any other proper option then maybe fake it.
i dont know why AI move to doesnt work and i dont know what your setup is (other ai components and logic) so my only suggestion is the above

So for anyone looking at this in the future, I did end up faking it for AI characters. The player-controlled horse uses the fancy movement, and the AI horses use regular movement that was tweaked to look vaguely similar. The most important factors for getting the AI’s movement to look horse-ish were the rotation speed and the navmesh actor radius. I set up the rotation speed to increase with movement speed, which prevents sliding pretty well.