Download

Custom animBP for AI?

Hey guys, got a bit of a tech question here.
So im working on this character controller, https://www.youtube.com/watch?v=YalS_A8eYJw
and its come a long way, improved it some more after that video.

Now I want to start to work on AI characters and was wondering if that animBP is too complicated for an AI.
Is it normal to implement two different animBPs? One for the player character with all the anim details possible, and one for the AI with a more reduced level of features?
Or is it possible for me to use that animBP also in an AI and have it profit from all the things like turn-based leans, proper transition states speed based jump anims, death ragdolls and getup anims, target aim offsets etc. etc.?

Good question.
Theoretically speaking since the Animation Blueprint is really not supposed to have anything to do with one particular character blueprint and assuming you’ve set up the Animation Blueprint 100% by the books then yes, it’s a solid plan to use this same blueprint for the AI.
In the end however you oughta wonder whether that’s really the case (and it often is not). There’ll always be some minor additions like footprint notifies that you might want even slightly different for the player versus an NPC.
Personally I prefer having seperate Animation Blueprints for the sole sake of simplicity. Technically yes, as long as my Animation Blueprint is scoped properly then I should be able to apply it to my AI, but I just find it somewhat of an unconvenient workflow to see all these variables and nodes related to specific player actions that this particular NPC won’t make use of.

Define “normal”. It’s really up to your own preference.

Excluding the obvious majority of occasions where the AI uses completely different meshes and animations from the player, I’d say it’s common practice to have a slightly simpler variant of your Animation Blueprint to slap onto the AI character.

Cool, this reply helps a lot. Would you happen to have any resources regarding

?
I dont think i have seen any good resources on learning how to implement an animBP properly so that it can be reusable.

There’s no resources I know of because it’s fairly straightforward. It is possible to reference the player pawn or player controller inside an Animation Blueprint but it requires a fair bit of casting.
It sounds stupid (and it is indeed wrong) to do so but there’ve been several moments where I felt like I hit a brick wall in development and felt compelled to implement a quick “dirty edit” where I would reference the player pawn inside my character blueprint, but it’s usually never a good idea. Your character blueprint is there to respond to input, interact, jump, etc. while the animation blueprint doesn’t receive any of that information. It doesn’t know the player pressed the jump key. It only knows the player is suddenly in the air and thus should probably switch to the corresponding animation.

I’m probably not telling you anything new here considering the high amount of quality you’ve already got set up in your video. Looks amazing.