Cast to Character failed in Animation Blueprint
I've been trying to get the jump animation working when jump bJumpPressed is true and have been unable to get it to work. After a lot of wasted time, I hooked a "Print String" event to the "Cast Failed" target, and realized that this was the issue.
Would anyone be able to tell me why this cast is failing?
When I run the project, the screen prints "Ugh" and "Hello":
I redid the whole event graph to make sure I hadn't done something wrong, which is why there's no additional logic. But, the cast is still failing.
Ok, so this is odd, but this only happens if I have the blueprint open. If I compile and close the blueprint, and run the project the cast doesn't fail. But, if I run it with the blueprint open it fails. Not sure why this is, but at least I know how to move forward now.
answered Nov 02 '14 at 03:03 PM
I have the same question!!! Finally,I found I open the wrong AnimBP. I actually use another AnimationBP now. Maybe you should check your animation Blueprint name.
answered Feb 02 '15 at 03:08 PM
I think this is actually by design, if you look closely the name of the pure node is called Try Get Pawn Owner, which means it only tries. If you need functionality it will call through the cast most of the time as shown by the hellos being printed. Im not sure on the technical details behind why but you should be safe to ignore any of the failed casts unless its being generated all the time and without any successful casts.
answered Feb 11 '17 at 01:44 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here