My Cast doesn't work but ingame it seems to work?

Well I just tried setting up my AI and for some reason the anim blueprint won’t cast to the character blueprint, then I checked my character because I couldn’t find the error and even there it says cast failed but in game everything is totally fine, it plays all the animations etc…
I am totally clueless

check what you are previewing in the anim blueprint. The default “Preview mesh” is not your hero class. If you run it in game and actually select your character instance you should see it runs correctly.

Just in case you did not know, the preview instance can be selected at the top of the screen. If you run your project in an editor window it will populate with the instances that have spawned in your game. you can then select each one individually and debug them.

Tried that, doesn’t work when doing that it still outputs cast failed, even if in my character…

Hi ,

Make sure Your “Cast to Hero” is referencing the correct name of your character blueprint. (ie. The name of your Character blueprint in this instance should be “Hero” not “Hero_BP” “HeroCopy” “Hero2” etc.)

This may not be your issue but is a common occurrence. If this does not resolve your issue let me know.

Thanks