You can see the cast failed exec chain (the cast succeed never fires so it’s not flip flopping). I am 100% sure I set the cast to the right class (the same as the == class), I have nothing similarly named in the project. I double checked that my character is using the anim bp, it is a character class, any ideas?
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!
Thank you, I should’ve disclosed that get owning actor is something I’ve tried before, and I’ve also tried the is valid check, and the cast still fails. I seem to be able to make it work with “is valid” and pure casting it, but I lose the functionality of verification, which is a really big problem
It’s better to push your data to the animBP from your actor class rather than using the animBP to pull it from the actor. Use On Tick in your actor (or where it makes sense) to set your animBP vars and just use those vars in the animBP. Keep your logic simple in there to ensure you’re using ‘fast path’:



