Anim Graph Function

Hi all,

Is there any way to create an Anim Graph ‘function’ to avoid code duplication if two states compute their final animation poses in similar ways?

Cheers,
Ian

If I’m understanding your question correctly, you’ll want to look into blend nodes. A ‘blend by boolean’ will output one animation or another depending on the boolean variable you put into it. So if you have a dying state, you could check if the death was by bullet (ie, make a ‘bullet death’ variable and set is true) and play an animation that looks like the character got shot, or death not by bullet (ie 'bullet death is NOT true). If you had many ways to die, you can make an enum list of death types, save to enum variable, use a convert byte to int box, and use it as an input to a ‘blend by int’, then add as many input blend nodes as you want- one for each type of death. You could also just make very specific conditions in your state machine transitions and have multiple varying states for a certain event/state.