Has anyone else managed to get this set working with npcs?
I created a child class of the already working Motion Matching Character provided in the sample, pop an ai controller on it, and have it walk to a random location on a loop, using the standard ‘ai move to’ node. But they walk with tons of foot sliding, wrong looping animations, facing wrong direction, etc…
However forcing inputs, via tick, like a player with input keys, things work as expected.
Couldn’t find an online solution nor a local fix. Anyone got any ideas
Ais dont have direct input, so there really isnt a way to use something that’s meant to receive direct player input and make it work witjout said input.
You’d have to recode half the thing or make a much too sophisticated AI which will just cripple your project over usage costs.
Best pathway is to not use motion matching on AI unless its specificially coded to work for AIs…
Seems like this motion matching setup ain’t worth it if only the player can use it?
Doesn’t seem right to me, doesn’t Fortnite use this system? I’m guessing their NPCs don’t?
Fortnite uses nothing that’s “new”.
They have to preserve gameplay, some of the “new” stuff brings you down to 1fps on a 4090…
everything they do in fortnite is custom re-built specifically for fortnite.
To the point its actually more of a custom engine than a version of UE.
That said. Motion matching was ever only meant for direct player input. As a root concept.
You can get (with heaps of work) an AI to behave like a player with direct input.
But its an AI.
Why bother?
You already know when it will stop moving. You dont need to predict it.
You already know when it will rotate to follow or whatever else. You dont need to predict that.
Just build a proper AI with the correct movement/animation calls.
Yeah I managed to do it. I followed a tutorial on how to add sandbox character to my game. Then created a new blueprint with the sandbox character and renamed it to sandboxEnemy, Created a new Anim blueprint for that enemy character. Changed the Character reference variable to new character BP. Fix all variables to new ones by either refreshing them or creating identical ones. Then make sure it’s casting to your new character. Then in BP added the AI Perception to it. Add your senses and removed all inputs and camera from BP. Then add the Script. Don’t know if I did it 100% correct but it works for now.