How To Change Animation BluePrint To Different Class?

How To Change Animation BluePrint To [Pawn or Character] Parent Class?

I don’t know what you trying to do, but the compile errors indicate that your casting logic is messed up.
if you are trying to get a reference to the animation bp from inside the animation bp you don’t need a cast just get a reference to self.
if you are trying to get a reference to the character/pawn then you should make a new character/pawn bp then cast to whatever you named your character from the anim bp.

this is what im trying to do

anim bps dont inherit from pawn or character so even if you change the parent it will just be completely useless and broken.

lol we answer at the same time, thanks
check this one, you will know what i need exactly
https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1582095-make-mounted-machine-gun

your casting to the wrong class. the error is telling you that bp_animcannon doesnt inherit from bp_pawncannon so what you should be casting to is the pawncannon class. im assuming that your trying to get a variable from the pawn right.

In your Actor BP for your cannon (we’ll call it BP_Cannon), set the skeletal mesh to use your BP_AnimCannon

Here’s how mine looks:

267937-ue-answerpic52a.png

Then in the BP_AnimCannon do this:

  • TryGetPawnOwner → Cast to BP_Cannon
1 Like

Thanks Alot, its working

If its working can you upvote and mark the correct answer?