Is it bad practice to Declare a Function in Anim Instance? c++

enam1984
Tue, 11 Mar 2025 21:57:24 +0000
Programming & Scripting

Hi all,

I am creating an FPS type game.

I created a function called Procedural Recoil In which I outlined recoil functionality.

The Function then gets triggered from a button press in the Character.cpp Class (Fire Weapon) - Function Call is CharacterAnim->GetProceduralRecoil.

I cannot get the animation to react even though I’ve checked the code over and over.

Is it bad practice to create the function there in the Anim instance?

Function in AnimInstance:

Transform Variables calculated to be passed to Anim Graph:

Character Class where the Animation Class Function is called:

2 posts - 1 participant