# How to do i use interface here

**URL:** <https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824>\
**Category:** Blueprint\
**Tags:** interface, casting, unreal-engine, editor, Blueprint, question\
**Created:** [May 24, 2024, 1:15pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824 "2024-05-24T13:15:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yumi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yumi/32/938449_2.png) [@Yumi](https://forums.unrealengine.com/u/Yumi)\
**Post date:** [May 24, 2024, 1:15pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/1 "2024-05-24T13:15:42Z")

</div>

![Screenshot (48)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/e/54e43fef7cadf5c16087ea37e347aff96c9f4b68.jpeg)  
 ![Screenshot (50)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/6/c866e6970db907c8da4978f7f9871c3fb895944b.png)

I’m trying to interface so far no issue but heard ppl saying casting can also avoid but i just cant figured it how

1st Screen shot from Animation blueprint

Thanks for help

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 24, 2024, 1:20pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/2 "2024-05-24T13:20:13Z")

</div>

What are you actually asking about? You say you want to use an interface, but then you say you’re already using an interface and it works fine (even though we cannot see it).

> ppl saying casting can also avoid

Any chance you could clarify this one, too?

---

<div class="post-metadata">

**Author:** ![DragonRelt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dragonrelt/32/1075747_2.png) [@DragonRelt](https://forums.unrealengine.com/u/DragonRelt)\
**Post date:** [May 24, 2024, 1:59pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/3 "2024-05-24T13:59:11Z")

</div>

I believe the issue is they want to cast to the player controller and they need to figure out how to so they can basically just use the inputs into the animations most likly. However i don’t think this is possible to my knowledge. If this is not what your saying then as the previous post inquires Please tell us more.

---

<div class="post-metadata">

**Author:** ![Yumi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yumi/32/938449_2.png) [@Yumi](https://forums.unrealengine.com/u/Yumi)\
**Post date:** [May 24, 2024, 2:48pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/4 "2024-05-24T14:48:40Z")

</div>

Sorry my bad there  
What I meant to say that I have using interface in line trace and interact event  
But I want to use it for casting as shown 1st screenshot (In animation blueprint)

---

<div class="post-metadata">

**Author:** ![Yumi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yumi/32/938449_2.png) [@Yumi](https://forums.unrealengine.com/u/Yumi)\
**Post date:** [May 24, 2024, 2:51pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/5 "2024-05-24T14:51:13Z")

</div>

Yes you got it right sorry for my bad English  
You said, it’s not possible, is there any way around without casting to my player blueprint?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 24, 2024, 2:58pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/6 "2024-05-24T14:58:29Z")

</div>

I do not understand the issue. What _exactly_ is stopping you from calling an interface function? You know how to call it when tracing, this would be identical.

> I want to use it for casting

What does it mean that you want to use _interface_ for _casting_? You either use an interface (which also casts but you can’t see it in BP - it’s hidden from you), or you cast yourself.

---

<div class="post-metadata">

**Author:** ![Auran131](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Auran131](https://forums.unrealengine.com/u/Auran131)\
**Post date:** [May 24, 2024, 3:08pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/7 "2024-05-24T15:08:48Z")

</div>

casting is fine in certain places, for instance an Animation will only have one type of owner and that owner will be loaded into memory. So cast away there.

That said, dont do it on Update, do it once on start, save the Ref like you have and use the Ref on update.

---

<div class="post-metadata">

**Author:** ![xeoncat](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xeoncat/32/1140479_2.png) [@xeoncat](https://forums.unrealengine.com/u/xeoncat)\
**Post date:** [May 24, 2024, 4:08pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/8 "2024-05-24T16:08:53Z")

</div>

Save the reference on the Initialize Animation event then do a Validated get on the Update. Notice that you don’t need a reference to your specific Pawn if you only need Actor or Pawn variables.

Also make an event to update the reference if you’re going to possess more than one pawn and keep the Animation Blueprint. You will need to call this event manually

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/7/187ff18371f1bc62cc716ab02a6bad7c4bfad2ae.png)

---

<div class="post-metadata">

**Author:** ![DragonRelt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dragonrelt/32/1075747_2.png) [@DragonRelt](https://forums.unrealengine.com/u/DragonRelt)\
**Post date:** [May 24, 2024, 10:57pm UTC](https://forums.unrealengine.com/t/how-to-do-i-use-interface-here/1870824/9 "2024-05-24T22:57:25Z")

</div>

Im not sure if this might be what you need if the one above me is not what you need but if you want to access the animations within the blueprint you can get the animation instance like such.

 ![this](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/4/4b4ad5242dca83d2b7a70fd9147204097a48eb0c.png)

Make sure you know exactly what you need as it helps up others diagnose the issue better!
