# How To Change Animation BluePrint To Different Class?

**URL:** <https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946>\
**Category:** Blueprint\
**Tags:** remove-from-parent, actor-blueprint, unreal-engine, question, Blueprint\
**Created:** [February 8, 2019, 12:53am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946 "2019-02-08T00:53:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![KingOfSapiens](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KingOfSapiens](https://forums.unrealengine.com/u/KingOfSapiens)\
**Post date:** [February 8, 2019, 12:53am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/1 "2019-02-08T00:53:42Z")

</div>

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

 ![267874-cannonbperror.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/7/2/0725bb3cf5684d7a7033854d2cdceadbb453155b.jpeg)

---

<div class="post-metadata">

**Author:** ![IndieGameCove](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IndieGameCove](https://forums.unrealengine.com/u/IndieGameCove)\
**Post date:** [February 8, 2019, 2:11am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/2 "2019-02-08T02:11:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KingOfSapiens](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KingOfSapiens](https://forums.unrealengine.com/u/KingOfSapiens)\
**Post date:** [February 8, 2019, 3:01am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/3 "2019-02-08T03:01:45Z")

</div>

this is what im trying to do

 ![267880-cannonbperror.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/b/33bda24edb67133ea0ffcbd91b06b4d0fc454a06.jpeg)

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [February 8, 2019, 3:02am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/4 "2019-02-08T03:02:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![KingOfSapiens](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KingOfSapiens](https://forums.unrealengine.com/u/KingOfSapiens)\
**Post date:** [February 8, 2019, 3:04am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/5 "2019-02-08T03:04:09Z")

</div>

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](https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/1582095-make-mounted-machine-gun)

---

<div class="post-metadata">

**Author:** ![ThompsonN13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThompsonN13](https://forums.unrealengine.com/u/ThompsonN13)\
**Post date:** [February 8, 2019, 3:39am UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/6 "2019-02-08T03:39:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [February 8, 2019, 6:13pm UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/7 "2019-02-08T18:13:06Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/c/0ec0a3e1b8d90a8639e201a376845f97d13973a4.png)

Then in the `BP_AnimCannon` do this:

- `TryGetPawnOwner` → Cast to `BP_Cannon`

---

<div class="post-metadata">

**Author:** ![KingOfSapiens](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KingOfSapiens](https://forums.unrealengine.com/u/KingOfSapiens)\
**Post date:** [February 8, 2019, 8:10pm UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/8 "2019-02-08T20:10:46Z")

</div>

Thanks Alot, its working

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [February 8, 2019, 11:37pm UTC](https://forums.unrealengine.com/t/how-to-change-animation-blueprint-to-different-class/442946/9 "2019-02-08T23:37:50Z")

</div>

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