Good Lord, I don't understand why there's so few tutorials on this. Now I understand the concept, but originally I was hooking stuff in with a prayer that the compile button wouldn't turn yellow... or worse, red.
@cyberjism
Жыл бұрын
Thanks Matt. Your screen resolution is spot on as always...makes it easy to grab clear screenshots. Having each CastTo Node visualized with its corresponding nodes all in a single cheat sheet document is super helpful 😎
@kenalpha3
Жыл бұрын
+1 res. I hate youtube vids that have ultra big screens, yet they refuse to zoom in on the graph mode - for us to see. We cannot see the text when they have 12000x 8000 and the graph part is only 200x. There is also a paid market asset that changes the DPI. Pro KZitemrs should be using this, if theyre too rude about making vids readable. Matt doesnt have this problem.
@MattAspland
Жыл бұрын
That's great to hear!
@julioperonerocholl9364
Жыл бұрын
I finally understand more about the cast!. But if it is a specific actor, for example a lamp that I want to turn on and off, which goes in the node of the object?. Many users create an actor variable with the selected actor but there I get a message that it is not necessary to use cast since I can already access its functionalities in the variable, I don't know what to do there 🤔
@studiobaxter1242
Жыл бұрын
It's amazing how you knew I might need to watch this a number of times... ;)
@michaelsuffix9092
Жыл бұрын
Hey Matt! Great Videos! I have a Question. I am absolutly lost. Can you make a video about how to align the fingers to a Object? e.g. holding an object? Thanks!
@DeputyChiefWhip
Жыл бұрын
Hmm nice video but doesn't really "do what we need it to do". The problem is that when casting people don't know what object to get. What would be helpful are more examples or a link to an object wildcard list based on casts. The ones you listed are easywhrn you know how! It's weird that this is one of the most common things to do in UE but it's the least well known.
@g-dojjo
Жыл бұрын
Thank you so much bro!! Great and very helpfull tutorial!!!
@MattAspland
Жыл бұрын
Glad it helped!
@WWatson99
Жыл бұрын
Cast To took me SO LONG to comprehend what needs to be connected to it. I was told to just use interfaces but I persevered and now I understand it.
@clebo99
Жыл бұрын
I still have so many issues regarding casting to something that is not the 3rd person character. If I have an Actor BP that has a simple string variable, I just want to be able to push "1" (created in the 3rd person BP) and print string the variable content. I keep getting the Cast Failed and I'm pulling my hair out on how to do that.
@jarnine9803
Жыл бұрын
Trying to cast to game mode with get game mode as my object from a button widget to a custom event to change wave amount in a zombie wave game. But i cant get it to cast, when i have open level after cast to game mode it is not triggering open level :(
@RealParadoxed
Жыл бұрын
Would be awesome if you could do a multiplayer version of this guide
@JessicaMarinaRushie
Жыл бұрын
I agree because getting a player by index will not work in multi player.
@Wilkoooo
Жыл бұрын
Hi Matt, I don’t know if you’ll see this but I’m a huge fan of your work on KZitem! All of your tutorials are really easy to follow and you explain everything so well! :) (your animation blueprint videos are lifesavers ahaha) I don’t know if you would consider taking a video request, but there’s something I’m stuck on right now in a project and am a beginner to Unreal so the other videos I’ve tried to follow aren’t very beginner friendly. Essentially, I would like to know if there is anyway to spawn in two playable characters that have different models and animations for a two player puzzle game? I followed one tutorial, but the only thing that could change between the characters was their material colour, and I need them to both be able to spawn from set checkpoints if one character dies or if the player selected spawn from checkpoint in the menu (in case they get stuck in the puzzle!) Thank you so much for reading this dude!✌️
@MattAspland
Жыл бұрын
Hey mate, thanks for the comment! I can add it to my list, but these videos might help in the meantime :) kzitem.info/news/bejne/0oevs2uijHerrKw kzitem.info/news/bejne/sa16rnuenXZ4kqA
@Wilkoooo
Жыл бұрын
@@MattAspland thank you so much for the reply, I really appreciate it dude! I’ll check out that link too, thanks again :)
@andrelucas4473
Жыл бұрын
Hey Matt, I have 2 questions: 1- I still don't understand the difference between the "cast to pawn" and "cast to character". In both cases we can have access to the blueprints, right? 2- What is the difference between, for example, the "cast to character" and the "get actor of class" (not all actors)?
@RMC_
Жыл бұрын
I've watched 5 tutorials on this now and still can't find what I'm looking for. Bascially I'm trying to access a widget blueprint, any idea what the object should be?
@errormachine5056
Жыл бұрын
i'm still kind of lost. for what i need i have a blueprint with my music layers in it and when my player dies i want the music to stop (or change) and i have a custom event in my music blueprint and i want to call on it in my player character when she dies. so in my player character i cast to music layers and can call on the custom event to happen but i have no clue what the object is for a music layer blueprint.
@apon22
Жыл бұрын
NICE, Thank you!
@MattAspland
Жыл бұрын
My pleasure!
@renkyysdev
Жыл бұрын
Quick Tip: Try not to use this node if possible! :D
@ralphhleihel5079
Жыл бұрын
I hate the fact that it still confuses me
@protophase
Жыл бұрын
Why not??
@eligijuspranskunas3509
Жыл бұрын
if i have tree actor, and used inside resource component. how i can cast to that component? i can't cast to actor, i can't cast to component, because they don't have parent, as they are separate blueprints sitting in my project folder.
@rifat.ahammed
Жыл бұрын
Thank You
@dreamingacacia
Жыл бұрын
I know this node is quite useful, but let's say I'm trying to avoid too much dependencies within my project. How would I implement the whole structure? Yeah, please teach about project structure that is good for games with more contents so it's bad to have dependencies everywhere.
@kenalpha3
Жыл бұрын
To decouple, use BluePrint Interface (BPI). Search for vids on that. +1 if he does a new vid on BPI (theres many old vids, some incomplete, so a newer one would be better).
@X1X1X1X4
Жыл бұрын
Great video as always 👍
@MattAspland
Жыл бұрын
Thanks!
@JessicaMarinaRushie
Жыл бұрын
A lot of people get stuck on this f**k of a node, thanks Matt.
@predakinggaming5355
2 ай бұрын
castign for the widget bluepritn is not workign . its not giving any error like cast will always fail but i am usign print statement and in that i am able to know that the cast is failing .
@nand-studios
Жыл бұрын
I LOVE YOU!!!!!!
@tastysnak
Жыл бұрын
I think casting can be troublesome for beginners especially, and the more experience who have picked up bad habits, if they are going about the process backwards. Essentially, you shouldn't be casting to something unless you know what you're casting from! Bringing in a cast node and then trying to figure out what should go in it is not the best way to go in my opinion.
@GatlenShado
Жыл бұрын
@ 3:05 Cast to widget Would love to see other examples of this. Specificly how to cast to a widget that is in a blueprint from another blueprint's event. Such as, I want a score board to update when a character makes a goal.
@DailyPaily
Жыл бұрын
You have a special class for it. Library blueprint.
@GatlenShado
Жыл бұрын
@@DailyPaily Nice! Thanx I'll dig in and see what I can find. :)
@kenalpha3
Жыл бұрын
I used BluePrint Interface (BPI) to pass variables from/to widgets/Blueprints. I'll have to get back to you with the details tomorrow. Specifically: I have a Widget as a component in a BP. And a third BP actor that sends variables to the Widget and the BP it is in.
@GatlenShado
Жыл бұрын
@@kenalpha3 Thanx. I think that makes sense, I'd have to try it to really connect the dots. If you have a tutorial or a one you can point me to that would awesome.
@pipeextile
Жыл бұрын
I definitely hate how Epic (Unreal Engine Devs) leaves us in the mud with their "Documentation"... All the information mentioned in this video should be in the documentation! I've seen entries like "Axis" with dull descriptions like "The Axis of an object" with no further examples or explanations on how many Axis you can transform an object to... In the end is a good thing the community is always welcome to help new people interested in learning.
@kenalpha3
Жыл бұрын
+1000. It's so annoying that the devs know what something is, yet set the description to repeating what it is, instead of what it does. I do not understand how Epic can have so much money, yet they havent paid anyone to go thru Variables/settings, and write a sentence of what everything does. Or they could even take action, post a thread at the forum, and ask the Community to tackle every variable: Ask us to post the explanation for approval, then the Devs issue an update. I wish they would at least issue a 4.27+1 update for that - without needing to break compatibility, just push cosmetic descriptions that should have been in years ago. Or perhaps a plugin can do this?
@GroundbreakGames
Жыл бұрын
Do you really want everyone to be able to do this with their hand held?😊
@kenalpha3
Жыл бұрын
@@GroundbreakGames act professional or get out. There is nothing "hand held" about a billion dollar game engine company explaining what their creation engine does - instead of having a setting called Setting A, and the description says "changes the value of Setting A." You're clearly not a logical thinker nor humble - because everyone wise knows that LEARNING what a tool does - makes it more effect to use. Your comment reflects laziness - of coders creating options but being too lazy to explain what the option does or the benefit. (And the UE guys explain things in vids. So I'm guessing the lack of discript was rushed, not their laziness - but the update needs to come.)
@Reunonen
Жыл бұрын
Get actor of class is like a pro version of cast node
@MattAspland
Жыл бұрын
Only for when you have one instance of the blueprint in the level, if you have multiple you will need to use "Get All Actors Of Class", which is a node you want to avoid where possible.
@TrialbyFire
Жыл бұрын
Just a quick question. This obviously doesn't work for all examples, but how is this better than just doing "get actor of class" & selecting the class type & then getting what you want from that return node? For example, I don't see how the pawn example is as efficient as this as you are adding 2 additional nodes to this instead of using just the one.
@chrispetersen3613
Жыл бұрын
Get actor of class will search through every actor in the scene until it finds it, which could potentially be very cumbersome. When you cast, you are specifying what base actor to look for and then you cast to a specific class derived from it. Instead of saying”look for this class” you say “look for this cLass that is inherited from this base.” Potentially reducing the search range dramatically.
@TrialbyFire
Жыл бұрын
@@chrispetersen3613 thanks Chris! Didn't know that. I'm regards to Matt's video if I may, if you have a blueprint of a radio in the scene & you cast to that, what would be the object type of that?
@jackrootsey4085
Жыл бұрын
What about casting to an actor?
@MattAspland
Жыл бұрын
You'd follow the same principle explained in this video :)
@FPChris
Жыл бұрын
How to cast to a string containing the class name?
@3DWithLairdWT
Жыл бұрын
"Cast" quite literally is just checking "Is this object I'm wiring into the cast node the same as the type I'm casting to", you're not actually accessing anything *inside* another blueprint. In C++ we would do: Cast(Object) Cast success? You get a "pointer" to the object you passed in, and you access the functionality it already has within itself. Failed? In code you get a nullptr, but in BP you just get the execution flow back to continue doing things. So what this means is that the "Object" itself has all of the functionality because it A) Literally is the thing you compared it to (ex: cast Actor to Actor) B) Is a child of the thing you compared it to and thus contains all the parts of its parent in its own code. (ex: cast pawn to actor, or cast character to actor) C) It is not the thing you compared it to, so you just move on So a "Pawn" doesn't reach into an "Actor" blueprint to do things, it already has all of the functionality of an "Actor" built in - it "inherits" this by being a child class. To communicate from one "Instance" (meaning an actual copy of a class that exists within the game world) of a class and another instance, you could use an "Interface" to get a reference or pass data. "Get Player Character" is just accessing a stored reference the game engine source code knows to get because its commonly a used reference. These concepts are why a lot of users get confused by wanting a reference to a specific "Instance" of a class, rather than upcasting to a parent class to use some functionality it contains. Another Ex. Say I do an overlap check, and I take the reference to some actor it provides, and I want to know if that actor that hit me is some type I care about, I would cast that reference(object) to check what it is. Then do something. The "OnOverlap" already passed me a reference to a specific thing, that's what the code does, the "Cast" you would do after is just a "what is this thing" check.
@tanver3d982
Жыл бұрын
how do i cast to AI controller
@hexagone3484
Жыл бұрын
1st
@4noxu430
Жыл бұрын
😑
@Leomerya12
Жыл бұрын
@@4noxu430 , let them live.
@MartKart8
Жыл бұрын
I just cast a node to a mesh I built, it works, the only issue is how do I let it fly in the air. I built a flying drone. If I place it in the air, it falls down and moves on the ground.
@MartKart8
Жыл бұрын
Never mind I think
@JavierAgueroCL
Жыл бұрын
How to cast to VolumetricCloud?
@netanel8334
Жыл бұрын
Volumetric Cloud is usually only one instance in the level so you could use "get actor of class" for that.
@anthonytaylor7670
Жыл бұрын
I'm trying to use an end game widget to update if the player completed certain missions, and when binding the text in the widget and pulling the boolean from the other blueprint to check if its true, I never know what object to put when its from other blueprints. Most of your examples were from things inside the same blueprint, this wasn't very helpful.
@kenalpha3
Жыл бұрын
I used BluePrint Interface (BPI) to pass variables from/to widgets/Blueprints. I'll have to get back to you with the details tomorrow.
@schmoborama
10 күн бұрын
Fuuuuuuuuuu why does NO ONE show how to Cast to an Actor?? There is no "Get Actor" node for Object pin. Tried "Get Parent Actor" and no compile error but the reference does not work at all. FUCK
Пікірлер: 65