Why's my cast to the correct class failing?

Hello @tolacipeetahi ,
I’m not very familiar with animations, but I’ve been doing some research and found several posts describing a very similar issue. In many cases, they mention that the Cast fails because the reference is not yet valid when Update Animation is executed.

Some of the suggested solutions are:

  • Adding an Is Valid node at the beginning, before trying to use or cast the Pawn.

  • Using Get Owning Actor instead of Try Get Pawn Owner, as mentioned in one of the posts, since in some cases the AnimBP doesn’t have a valid Pawn at that moment.

I’ll leave you another post where they discuss this behavior in more detail

Hope it helps!