# \#cast-to

**URL:** https://forums.unrealengine.com/tag/cast-to/4421.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [Why C++ casting is more efficient (for memory) and blueprint casting - NOT?](https://forums.unrealengine.com/t/why-c-casting-is-more-efficient-for-memory-and-blueprint-casting-not/2059434)

<div class="topic-metadata">

**Author:** [@Wisewalker](https://forums.unrealengine.com/u/Wisewalker)\
**Replies:** 8\
**Last updated:** [October 9, 2024, 11:32pm UTC](https://forums.unrealengine.com/t/why-c-casting-is-more-efficient-for-memory-and-blueprint-casting-not/2059434 "2024-10-09T23:32:19Z")

</div>

Hello! Recently I have been reading a lot about the performance problems related to blueprint casting (i.e. in BPs using nodes ‘cast to’, ‘get all actors of class’, ‘get actor of class’ etc. results in creating hard refe…

---

## [Transfering Integer to widgets?](https://forums.unrealengine.com/t/transfering-integer-to-widgets/396314)

<div class="topic-metadata">

**Author:** [@Brohst](https://forums.unrealengine.com/u/Brohst)\
**Replies:** 6\
**Last updated:** [October 6, 2024, 11:00am UTC](https://forums.unrealengine.com/t/transfering-integer-to-widgets/396314 "2024-10-06T11:00:34Z")

</div>

Hey guys, Iam kind of lost and out of ideas how to set the text of a text block (Widget) to the same value as my Integer. Ive tried to set up a “Cast to” but with that i don’t know what to select as an object. This is t…

---

## [In the Animation Blueprint, the Pawn obtained using the TryToGetPawnOwner node cannot be cast to a subclass of Character.](https://forums.unrealengine.com/t/in-the-animation-blueprint-the-pawn-obtained-using-the-trytogetpawnowner-node-cannot-be-cast-to-a-subclass-of-character/2022169)

<div class="topic-metadata">

**Author:** [@Soldhum\_Soon](https://forums.unrealengine.com/u/Soldhum_Soon)\
**Replies:** 1\
**Last updated:** [September 15, 2024, 7:25pm UTC](https://forums.unrealengine.com/t/in-the-animation-blueprint-the-pawn-obtained-using-the-trytogetpawnowner-node-cannot-be-cast-to-a-subclass-of-character/2022169 "2024-09-15T19:25:25Z")

</div>

UE5.4.1 I have a CharacterStage that inherits from Character. In the Animation Blueprint, the Pawn obtained using TryToGetPawnOwner always fails when using Cast To CharacterStage.

---

## [i dont understand why my cast to isnt working](https://forums.unrealengine.com/t/i-dont-understand-why-my-cast-to-isnt-working/1663984)

<div class="topic-metadata">

**Author:** [@EisbarderEchte](https://forums.unrealengine.com/u/EisbarderEchte)\
**Replies:** 1\
**Last updated:** [February 3, 2024, 11:44pm UTC](https://forums.unrealengine.com/t/i-dont-understand-why-my-cast-to-isnt-working/1663984 "2024-02-03T23:44:29Z")

</div>

I dont understand why my cast fails. I just want to cast to my enemy, which is basicly a copy of the player.

---

## ["Cast to" help](https://forums.unrealengine.com/t/cast-to-help/1222035)

<div class="topic-metadata">

**Author:** [@songofstormss](https://forums.unrealengine.com/u/songofstormss)\
**Replies:** 3\
**Last updated:** [July 7, 2023, 9:55pm UTC](https://forums.unrealengine.com/t/cast-to-help/1222035 "2023-07-07T21:55:15Z")

</div>

Hi, I’m trying to understand how to us the “cast to” node properly using blueprints. I am using a character BP for the player and an actor BP for the player ability “projectile” I plan on having multiple abilities and …

---

## [Help! Error when cast to + Fade Out Audio](https://forums.unrealengine.com/t/help-error-when-cast-to-fade-out-audio/468614)

<div class="topic-metadata">

**Author:** [@UraniumBonBeurre](https://forums.unrealengine.com/u/UraniumBonBeurre)\
**Replies:** 13\
**Last updated:** [January 11, 2023, 8:56pm UTC](https://forums.unrealengine.com/t/help-error-when-cast-to-fade-out-audio/468614 "2023-01-11T20:56:12Z")

</div>

So I have to get the sound references from my character blueprint. So I realize a “cast to”, and I recover my variables. Then I apply a “fade out” on them, and it seems to work properly. But when I launch the game and th…

---

## [Can't cast to my Widget blueprint even if I "get all widgets of class".](https://forums.unrealengine.com/t/cant-cast-to-my-widget-blueprint-even-if-i-get-all-widgets-of-class/468377)

<div class="topic-metadata">

**Author:** [@UraniumBonBeurre](https://forums.unrealengine.com/u/UraniumBonBeurre)\
**Replies:** 4\
**Last updated:** [May 28, 2022, 8:49am UTC](https://forums.unrealengine.com/t/cant-cast-to-my-widget-blueprint-even-if-i-get-all-widgets-of-class/468377 "2022-05-28T08:49:04Z")

</div>

So I have to cast to a widget blueprint from another widget blueprint. I used to use the “get all widgets of class” function, but in this case it fails everytime. Any suggestions ?

---

## [【Blueprint】level内に配置したactorから、level内に存在しないCharacterの参照方法の質問](https://forums.unrealengine.com/t/blueprint-level-actor-level-character/491396)

<div class="topic-metadata">

**Author:** [@nkarin](https://forums.unrealengine.com/u/nkarin)\
**Replies:** 2\
**Last updated:** [December 1, 2021, 3:39pm UTC](https://forums.unrealengine.com/t/blueprint-level-actor-level-character/491396 "2021-12-01T15:39:41Z")

</div>

UE4でいい感じの２Dカメラを作る 上記実装を行う際、 Actor型TargetActorへの参照を、 レベルに存在しない、プレイヤースタートから発生するCharacterクラスに設定したいと考えていますが、 方法がわかりません。 どういった情報を調べればいいかもわかりません。 どのようにすればスポーンしたキャラクターを参照することができるでしょうか、 何か参考になるサイトなどがございましたらご教示お願いいたします。

---

## [What do I cast in the cast function?](https://forums.unrealengine.com/t/what-do-i-cast-in-the-cast-function/314880)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_5c86276a](https://forums.unrealengine.com/u/anonymous_user_5c86276a)\
**Replies:** 14\
**Last updated:** [November 6, 2021, 5:32am UTC](https://forums.unrealengine.com/t/what-do-i-cast-in-the-cast-function/314880 "2021-11-06T05:32:16Z")

</div>

My problem seems to be quite a simple one, as my casts ALWAYS fail and I think its because I just dont really know what I am supposed to cast. I am usually making a reference to self. Example: I want my weapon to s…

---

## [How do I get the variable from another blueprint? What am I doing wrong?](https://forums.unrealengine.com/t/how-do-i-get-the-variable-from-another-blueprint-what-am-i-doing-wrong/489333)

<div class="topic-metadata">

**Author:** [@kingdomheart661](https://forums.unrealengine.com/u/kingdomheart661)\
**Replies:** 13\
**Last updated:** [September 29, 2021, 1:44pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-variable-from-another-blueprint-what-am-i-doing-wrong/489333 "2021-09-29T13:44:24Z")

</div>

I’m creating a checkpoint thing, where when you touch an object it adds a point to a variable, and when you collide with the floor if checks the variable and depending on the value it teleports you to a different checkpo…

---

## [Actor AnimBP cannot reference Pawn Variables?](https://forums.unrealengine.com/t/actor-animbp-cannot-reference-pawn-variables/483204)

<div class="topic-metadata">

**Author:** [@RipSteez\_1](https://forums.unrealengine.com/u/RipSteez_1)\
**Replies:** 1\
**Last updated:** [May 11, 2021, 2:11pm UTC](https://forums.unrealengine.com/t/actor-animbp-cannot-reference-pawn-variables/483204 "2021-05-11T14:11:48Z")

</div>

Hello, new to Unreal Engine. I am making a tower defense game, and the foundation is a template I found online. The wave enemies are Pawns and I was able to configure animation blueprints that keep them walking and the…

---

## [Cast variable to Animation BP](https://forums.unrealengine.com/t/cast-variable-to-animation-bp/477027)

<div class="topic-metadata">

**Author:** [@Tata\_Bittar](https://forums.unrealengine.com/u/Tata_Bittar)\
**Replies:** 6\
**Last updated:** [January 11, 2021, 4:19pm UTC](https://forums.unrealengine.com/t/cast-variable-to-animation-bp/477027 "2021-01-11T16:19:44Z")

</div>

Hi, I have a variable in the character c++ class that I want in the animation blueprint. I managed to get it there by casting in the character blueprints, however I want to do this with c++. Basically I need to conv…

---

## [Plays one animation or the other, not both](https://forums.unrealengine.com/t/plays-one-animation-or-the-other-not-both/476512)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_18375dc6](https://forums.unrealengine.com/u/anonymous_user_18375dc6)\
**Replies:** 1\
**Last updated:** [December 30, 2020, 3:27pm UTC](https://forums.unrealengine.com/t/plays-one-animation-or-the-other-not-both/476512 "2020-12-30T15:27:08Z")

</div>

I’ve been developing a project that combines the Unreal Twin Stick Shooter tutorial, and the Unreal Introduction to Animation Montage. They allowed me to script in a death animation (image 3) and a “Shoot” animation (im…

---

## [Cast failed but object is right](https://forums.unrealengine.com/t/cast-failed-but-object-is-right/469768)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_ee1c5260](https://forums.unrealengine.com/u/anonymous_user_ee1c5260)\
**Replies:** 0\
**Last updated:** [August 19, 2020, 5:54am UTC](https://forums.unrealengine.com/t/cast-failed-but-object-is-right/469768 "2020-08-19T05:54:08Z")

</div>

Hello guys ! I’m trying to get a boolean variable from a character blueprint. When the character touch me, I die. EASY. But when I cast to this character, the cast fail… i don’t understand because the object is correct… …

---

## [Help! How can I get the AI actor location from my Animation Blueprint?](https://forums.unrealengine.com/t/help-how-can-i-get-the-ai-actor-location-from-my-animation-blueprint/468575)

<div class="topic-metadata">

**Author:** [@UraniumBonBeurre](https://forums.unrealengine.com/u/UraniumBonBeurre)\
**Replies:** 2\
**Last updated:** [July 23, 2020, 8:44pm UTC](https://forums.unrealengine.com/t/help-how-can-i-get-the-ai-actor-location-from-my-animation-blueprint/468575 "2020-07-23T20:44:09Z")

</div>

I tried several things like “cast to”, etc… but none of them is working. It says there are errors… Any suggestions ?

---

## [Help! How can I get the AI actor location from my Animation Blueprint?](https://forums.unrealengine.com/t/help-how-can-i-get-the-ai-actor-location-from-my-animation-blueprint/468576)

<div class="topic-metadata">

**Author:** [@UraniumBonBeurre](https://forums.unrealengine.com/u/UraniumBonBeurre)\
**Replies:** 0\
**Last updated:** [July 23, 2020, 4:48pm UTC](https://forums.unrealengine.com/t/help-how-can-i-get-the-ai-actor-location-from-my-animation-blueprint/468576 "2020-07-23T16:48:47Z")

</div>

I tried several things like “cast to”, etc… but none of them is working. It says there are errors… Any suggestions ?

---

## [TriggerBoxにOverlapしたらActorをDestroyしたい](https://forums.unrealengine.com/t/triggerbox-overlap-actor-destroy/462798)

<div class="topic-metadata">

**Author:** [@mapiropiro](https://forums.unrealengine.com/u/mapiropiro)\
**Replies:** 9\
**Last updated:** [March 27, 2020, 4:01am UTC](https://forums.unrealengine.com/t/triggerbox-overlap-actor-destroy/462798 "2020-03-27T04:01:40Z")

</div>

２種類の方法で組んでみたのですが、どちらもうまくいきませんでした。 ①②どちらも「Cast To botandekieru」ノードのCast failedにprintstringを繋げたら反応したのでcastが上手くいっていないようです。 ②では「Cast To botandekieru」がWARNINGになっており、botandekieru does not inherit from "Character"と出ておりました。 (…

---

## [実行ピンのないキャストノードを使用する方法](https://forums.unrealengine.com/t/topic/460435)

<div class="topic-metadata">

**Author:** [@Longtail\_Tiger](https://forums.unrealengine.com/u/Longtail_Tiger)\
**Replies:** 4\
**Last updated:** [January 21, 2020, 7:10am UTC](https://forums.unrealengine.com/t/topic/460435 "2020-01-21T07:10:48Z")

</div>

普通に右クリックで出るウィンドウからCast Toを検索しても実行ピンが付いているものが出てくるため、画像中央下にある実行ピンのない「Cast To ～」のノードを出す方法が分かりません。 また、同じような内容の質問を探していたのですが、検索する際の適したキーワードが見つからず、上手く検索できませんでした。このような内容の質問は、どのようなキーワードで検索すると問題解決しやすいのでしょうか。

---

## [What is better? Cast to or blueprint interfaces?](https://forums.unrealengine.com/t/what-is-better-cast-to-or-blueprint-interfaces/449556)

<div class="topic-metadata">

**Author:** [@meme2sin](https://forums.unrealengine.com/u/meme2sin)\
**Replies:** 3\
**Last updated:** [May 25, 2019, 9:33pm UTC](https://forums.unrealengine.com/t/what-is-better-cast-to-or-blueprint-interfaces/449556 "2019-05-25T21:33:20Z")

</div>

So I when ahead and made some functions in one blueprint which I need in another blueprint and I was wondering which way would be the best to use functions from another blueprint. Putting aside the fact that I have no id…

---

## [Can't cast to npc camera.](https://forums.unrealengine.com/t/cant-cast-to-npc-camera/440945)

<div class="topic-metadata">

**Author:** [@krovatka](https://forums.unrealengine.com/u/krovatka)\
**Replies:** 8\
**Last updated:** [January 10, 2019, 7:11am UTC](https://forums.unrealengine.com/t/cant-cast-to-npc-camera/440945 "2019-01-10T07:11:42Z")

</div>

I want to make interact. And switch camera to another npc When my character interact with 1 npc, character camera switch to camera of 2 npc. How to make it? I can’t build right nodes. Sorry for strange screenshot. I do…

---

## [Widget cast to charater variable wont set](https://forums.unrealengine.com/t/widget-cast-to-charater-variable-wont-set/437883)

<div class="topic-metadata">

**Author:** [@Razman27](https://forums.unrealengine.com/u/Razman27)\
**Replies:** 2\
**Last updated:** [November 18, 2018, 8:45pm UTC](https://forums.unrealengine.com/t/widget-cast-to-charater-variable-wont-set/437883 "2018-11-18T20:45:42Z")

</div>

I have a character select widget and when you choose a class it changes the char model and sets a bool on character to true, but the bool does not set, it will execute every other function but wont set this one variable?…

---

## [My cast to my AIController is failing](https://forums.unrealengine.com/t/my-cast-to-my-aicontroller-is-failing/434675)

<div class="topic-metadata">

**Author:** [@Amurdo20](https://forums.unrealengine.com/u/Amurdo20)\
**Replies:** 2\
**Last updated:** [October 5, 2018, 3:55pm UTC](https://forums.unrealengine.com/t/my-cast-to-my-aicontroller-is-failing/434675 "2018-10-05T15:55:57Z")

</div>

So, I have been following this tutorial series. (Unreal Engine 4 RTS Series Part 3 Unit Creation - YouTube) and im encountering a problem with my cast to RTS\_AIController. The cast has been failing. Ive tried using mul…

---

## [Infinite loop detected after removing Cast To ThirdPersonCharacter Node](https://forums.unrealengine.com/t/infinite-loop-detected-after-removing-cast-to-thirdpersoncharacter-node/434802)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_263e38f4](https://forums.unrealengine.com/u/anonymous_user_263e38f4)\
**Replies:** 3\
**Last updated:** [October 1, 2018, 1:51pm UTC](https://forums.unrealengine.com/t/infinite-loop-detected-after-removing-cast-to-thirdpersoncharacter-node/434802 "2018-10-01T13:51:01Z")

</div>

hey guys I am unity programmer and recently learing amazing unreal engine. and of course stumbling with errors as usual. I am just following virtus’s running game tutorial and it works well this is blueprint of obj …

---

## [Trying to figure out the object wildcard when casting](https://forums.unrealengine.com/t/trying-to-figure-out-the-object-wildcard-when-casting/434426)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_46bf7df21](https://forums.unrealengine.com/u/anonymous_user_46bf7df21)\
**Replies:** 3\
**Last updated:** [September 24, 2018, 10:48pm UTC](https://forums.unrealengine.com/t/trying-to-figure-out-the-object-wildcard-when-casting/434426 "2018-09-24T22:48:04Z")

</div>

i have a Blueprint called test with a pointlight called testlight im trying to cast that blueprint so i can toggle the light with a keystroke but i keep getting this error

---

## [Casting to other actor doesn't work correcctly](https://forums.unrealengine.com/t/casting-to-other-actor-doesnt-work-correcctly/425601)

<div class="topic-metadata">

**Author:** [@eee](https://forums.unrealengine.com/u/eee)\
**Replies:** 1\
**Last updated:** [August 19, 2018, 1:20pm UTC](https://forums.unrealengine.com/t/casting-to-other-actor-doesnt-work-correcctly/425601 "2018-08-19T13:20:25Z")

</div>

I have a problem… When I hit the GhostTP with the FlashLight (FlashLight is located on FostTP), the custom event wich is located in GhostTP but called by the FoxTP executes only on the player who hit the Ghost, and not o…

---

## [Cast to game instance not working](https://forums.unrealengine.com/t/cast-to-game-instance-not-working/431471)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_451ef1c5](https://forums.unrealengine.com/u/anonymous_user_451ef1c5)\
**Replies:** 1\
**Last updated:** [August 12, 2018, 8:08am UTC](https://forums.unrealengine.com/t/cast-to-game-instance-not-working/431471 "2018-08-12T08:08:46Z")

</div>

Trying to increase score which works good on trigger box overlap how ever when I cast that good working score to game instance it’s keep showing what ever score you set inside the game instance. So basically it’s n…

---

## [How to get controller from AI actor?](https://forums.unrealengine.com/t/how-to-get-controller-from-ai-actor/430628)

<div class="topic-metadata">

**Author:** [@ng\_min\_teck](https://forums.unrealengine.com/u/ng_min_teck)\
**Replies:** 2\
**Last updated:** [August 1, 2018, 12:31pm UTC](https://forums.unrealengine.com/t/how-to-get-controller-from-ai-actor/430628 "2018-08-01T12:31:20Z")

</div>

Hello I want to get the Ai direction and speed for animation blueprint, I have no ideas how I can get the controller from AI actor?

---

## [Cast To ThirdPerson Character its not show up?](https://forums.unrealengine.com/t/cast-to-thirdperson-character-its-not-show-up/429426)

<div class="topic-metadata">

**Author:** [@DjDiegoG](https://forums.unrealengine.com/u/DjDiegoG)\
**Replies:** 1\
**Last updated:** [July 14, 2018, 7:55pm UTC](https://forums.unrealengine.com/t/cast-to-thirdperson-character-its-not-show-up/429426 "2018-07-14T19:55:56Z")

</div>

Hi, im following a tutorial to lear unreal engine 4, but there is some where i can not cast to the thirdperson as he shows on the video because there is not an option for me . this is to add a cast spell animation. hope …

---

## [Cast to Player Controller](https://forums.unrealengine.com/t/cast-to-player-controller/424063)

<div class="topic-metadata">

**Author:** [@eee](https://forums.unrealengine.com/u/eee)\
**Replies:** 15\
**Last updated:** [June 10, 2018, 1:11pm UTC](https://forums.unrealengine.com/t/cast-to-player-controller/424063 "2018-06-10T13:11:07Z")

</div>

Hey, I have a trouble… I want to cast my custom event that is on my actor named GhostTP by pressing X button on my another actor: Fox Blueprint in GhostThirdPersonCharacter: http://prntscr.com/jcdgsk Blueprints in Fox…

---

## [How cast Players in local multiplayer](https://forums.unrealengine.com/t/how-cast-players-in-local-multiplayer/426010)

<div class="topic-metadata">

**Author:** [@Charditronic](https://forums.unrealengine.com/u/Charditronic)\
**Replies:** 1\
**Last updated:** [May 27, 2018, 12:48am UTC](https://forums.unrealengine.com/t/how-cast-players-in-local-multiplayer/426010 "2018-05-27T00:48:22Z")

</div>

Hello my masters! I was searching in the documentation, but I’m not sure how can I do. I have an Enemy. When this enemy is near the Player, he follow him. To do that, I do a “Cast To”, but only can cast a player, and ob…

[Next page](https://forums.unrealengine.com/tag/cast-to/4421.md?match_all_tags=true&page=1&tags%5B%5D=cast-to)
