How To Use Cast Nodes And Why You Actually Want To Use Interfaces Instead - UE4/UE5 Blueprints

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ • 151

  • @JesseLeeHumphry
    @JesseLeeHumphry 3 роки тому +110

    This is a pretty solid tutorial. Casting v. Interfaces are really important. A few notes I don't think you covered in the video but that I wanted to point out to the curious.
    1. Interfaces are *technically* still casting, they're just not casting to the main class. Unreal has multiple inheritance, and when you "implement" an interface, that class is actually inheriting from the interface's object. So an interface message is casting to that inherited interface object. It's just a much leaner, more portable operation.
    2. Interfaces are typically meant for objects that aren't at all on each other's inheritance trees, like your usage of lights and the player character. If they're on the same inheritance tree, they should have a parent that has the desired event, and that parent is the class you cast to.

    3. There are big dependency and memory implications around casts in Blueprint specifically; namely that casts invoke references even if the reference isn't stored. That reference is loaded into memory on startup. If you're casting directly to an actor that you aren't positive is in the level, you're taking up memory on startup. It's quickly garbage-collected because Unreal is badass, but it'll impact load times.

    3a. Because casting loads a reference into memory (whether present in the level or not), it also loads THAT classes references into memory. If your character casts to a boss that isn't in the level, you'll load the boss's class into memory, and then you'll load anything the boss references, and so on. This can be a ballooning problem, and interfaces help curtail that.

    Solid video! I do think it was a tad bit long but you definitely got your point across!

    • @GDXR
      @GDXR  3 роки тому +15

      Thank you for posting this. It should be extremely helpful for those wanting more information.

    • @50shadesofskittles9
      @50shadesofskittles9 2 роки тому +1

      @@GDXR agreed

    • @3DWithLairdWT
      @3DWithLairdWT 2 роки тому +5

      Absolutely love how clear this description is A+

    • @Trait74
      @Trait74 2 роки тому +3

      Lifesaver information here! thank you very much!!!

    • @null643
      @null643 Рік тому

      So basically if I just want to fire an event, I should always use interfaces to avoid references in memory . But directly edit a variable, use a cast? Still a bit confusing to me

  • @CraftyMaelyss
    @CraftyMaelyss Рік тому +13

    Mate, you are an absolute *lifesaver* I got so mad since people kept saying 'use a reference' or 'you're not casting properly' without explaining *why* that was the case. Seriously, you've really helped so much by explaining this where a lot of other people don't :)

  • @Chrasmardan
    @Chrasmardan Місяць тому

    Casting has been so confusing, two months in to learning UE5. This is a game changer lol, thanks so much!

  • @benjaminbristow
    @benjaminbristow 3 роки тому +12

    I'm a solo dev but I love making things modular for some reason. Maybe one day I can put stuff onto the market place. Love your tutorial videos!

    • @GDXR
      @GDXR  3 роки тому +8

      Make it Modular is my Moto lmao. If you work Modular your less likely to bite your self in the but later down the line. It's a great way to think of things.
      When you do get something on there let me know. I'd love to see it.
      And thank you :)

  • @shaneruetz5604
    @shaneruetz5604 3 роки тому +4

    Can confirm, this used to drive me nuts, to the point where I would avoid casting all together haha. Good video!

  • @MGInspiration
    @MGInspiration 2 місяці тому +1

    I'm newbie in UE, love to learn with you, it's easy to understand .Thanks You

  • @mrorange159
    @mrorange159 8 місяців тому

    This is by far one of the most logical and straight forward tutorials I've come across that explains casting. Thanks very much!

  • @xenaisu
    @xenaisu Рік тому

    Thank you so much dude, been scratching my head for 6 hours and looked up multiple tutorials on the blueprint interface and only with your tutorial I finally got it to work.

  • @rochaleo19
    @rochaleo19 Рік тому +1

    I though that Interfaces were difficult before watching this video. Really helped. I was doing a total mess with casting. I just replaced a huge branching structure containing lots of casts to simply interfacing correctly.

    • @GDXR
      @GDXR  Рік тому

      Interfaces rule !!!

  • @motenai82
    @motenai82 Рік тому +1

    This might be the first channel that find about Unreal with in depth explanations of what you should do on a given subject, instead of flashy basic examples that look good and are usefule in the first 2 hours of learning Blueprints. Nicely done man!

  • @steveg7292
    @steveg7292 Рік тому

    This has been pissing me off for the past 2 days trying to figure this out and you explained it perfectly in 5 minutes. Gonna be watching all your videos now! Thanks so much man your a great teacher.

  • @ecoclasico
    @ecoclasico 2 роки тому +3

    Great tutorial!!
    I'd like to apport a tip that I don't know if it could be useful:
    When you created the "ActorsToActive" array, you used a ForLoop to call the "Activate" Event.
    If you just plug the ActorsToActive array to Activate Event directly, it applies automatically to all actors with Active Interface without the need to use ForLoop

  • @Switch620
    @Switch620 2 роки тому +4

    If the error is that the object is already a BP_Light.... that just means you don't need to need to cast it, and you can just call "Turn Light On" without casting.
    You've already set it in the editor that it is BP_Light, so the editor knows. By changing it to actor, then casting it to BP_Light, you're just adding unnecessary steps.

    • @3DWithLairdWT
      @3DWithLairdWT Рік тому

      This comment is underrated.
      The description of casting in the video is going to be quite misleading for newcomers

  • @aldystofan2196
    @aldystofan2196 3 роки тому +1

    this helping me so much to understand what actually happen with that blueprint, thankyou so much Jonathan!

    • @GDXR
      @GDXR  3 роки тому

      Thats awesome, I'm really glad it was helpful.

  • @fonfel94
    @fonfel94 2 роки тому +1

    Thanks a lot, man. I was trying to figure out how to make a door that opens when you step on a platform that is nowhere near that door, so I couldn't use any "on component begin overlap" and struggled to make this work. Your light example was perfect for this.

  • @kalewhite111
    @kalewhite111 Рік тому

    I was looking for a decent explanation of casting for so long. Thank you.

  • @adityasingh270
    @adityasingh270 2 роки тому +1

    Thanks man was searching for a video like this for months.

  • @mpjstuff
    @mpjstuff 2 роки тому +2

    If you have trouble creating a Blueprint Interface like I did. Make sure when you Add a new Blueprint you DO NOT select the Blueprint icon, but the pop-up in the menu below it that has Blueprints > and THERE you will find that pesky BPI. So many nooks and crannies in UE and you blink and you can miss something.

  • @dreambadger
    @dreambadger Рік тому

    Thanks for video. I'm currently learning about interfaces & components and i've watched a few of your videos today.

  • @DesertStormXQ
    @DesertStormXQ 3 роки тому +1

    very easy to understand, I like the way he instructs,
    i am new with blueprint and his teaching made me understand many things, thank you

    • @GDXR
      @GDXR  3 роки тому +1

      Your welcome, super pleased it was helpful.

  • @danielgiambattistelli7380
    @danielgiambattistelli7380 9 місяців тому

    Really cool video. At last one that makes thing a bit clear. So casting should be used on one to one communication. I really liked the for loop array with interface usage. this is super handy.

  • @jonny0_0
    @jonny0_0 2 роки тому

    Really great explanation. I've been struggling to get my head around this for ages. I feel like understanding this has opened a big door for me. Cheers!

  • @CGDive
    @CGDive Рік тому +1

    This is very well explained and useful. Thank you!

  • @lasereye159
    @lasereye159 2 роки тому

    Dude, i have to thank you. Very clear explanation, good speed.

  • @bamfyu
    @bamfyu Рік тому +1

    This was really helpful. Thank you.

  • @chagaze7199
    @chagaze7199 2 роки тому +1

    confirmed, it HELPED! Thanks a lot !!

  • @lildevilgamer
    @lildevilgamer 3 роки тому +6

    In the first example with the light when you get the note that bp_light is already bp_light wouldn't you be able to just get the bp_light and drag of the "turn light on" of off it without casting?

    • @WilliamMullins
      @WilliamMullins 3 роки тому +1

      Yeah, you would be able to. I think you would still need to make the variable public and manually set the reference in the scene, otherwise it won't have a proper reference, but it would work. I'm guessing they didn't point it out since the episode is about casting specifically.

    • @GDXR
      @GDXR  3 роки тому +1

      I dont think I could have said it better than William. You tottaly can do that but i specificaly wanted tot explain casting and typical errors. It was just the easiest way i could think of to explain the over all concept.

  • @X400DYL
    @X400DYL Рік тому +1

    WOW great Tutorial, Made total sence and well explained, Thanks Subbed

    • @GDXR
      @GDXR  Рік тому +1

      Thanks for the sub!

  • @kyoai
    @kyoai 3 роки тому +6

    I think your explanation of casting is a bit inaccurate. Casting is NOT sending information to the casted object, but casting is an attempt to convert an object/actor (or object-/actor reference) of one type to another type. The actual information sending happens after the cast, namely when you call the "Turn Light Off" function. But the casting itself is no message sending, just a conversion attempt.
    Casting helps us to find out whether something generic, such as an actor, is of a specific type, so we can do things with it that only the specific type can do.
    For example, in OnBeginOverlap where we only get the generic actor type of the actor object that overlapped. We only know that it is some kind of actor that overlapped, nothing more, and at that point we can only do things with it that a generic actor can do (set actor location, destroy actor, etc...).
    Games however usually have more specialized versions of actors, such as character, pick-up-items, projectiles, etc.
    In order to find out what kind of type an actor (or any object) is we can use casting to a specific type. If the object is of that specific type, we'll get access to its specialized features (TurnLightOff-function).
    If the cast fails then it means that the actor object and the type we're trying to cast to are unrelated. For example, Light and Character don't share any base class other than Actor, so if the overlapping actor is a character and we try to cast it to the Light type, the cast would fail, and then we can try to cast to another type to find out "if it's not a Light, then perhaps it is...".

    • @ChrisCohen
      @ChrisCohen 2 роки тому

      @@null643 it could be negligible but probably isn't in most cases. Best to assume that casting performance impact is significant and try to avoid it where possible.

  • @AriaRedux
    @AriaRedux 2 роки тому +1

    Yes!!! Thank you so much. This solves sooo many things for me!! Great tutorial. Very well explained.
    I greatly appreciate the time you put into this.

  • @MatyasCensky
    @MatyasCensky 8 місяців тому

    Very well explained, great examples. Thanks

  • @KyriosRat
    @KyriosRat Рік тому

    Great video, very good breakdown on communication through Blueprints.

  • @lukafi
    @lukafi 3 місяці тому

    A bit long but nonetheless a great video explaining a very important feature. I've yet to completely wrap my head around this and also components but this video helps tremendously and I think I have a basic understanding of interfaces. I appreciate your work!

  • @CraigMitchell666
    @CraigMitchell666 3 роки тому +1

    Great vid buddy! Keep 'em coming and thanks!

  • @John-cz7fo
    @John-cz7fo 3 роки тому +1

    Nice tutorial! I'll have to check out your other videos

  • @samuelmertens4116
    @samuelmertens4116 11 місяців тому

    very nice tuto, i finally understood how to make a reference for casting. But there's a problem: I can't do it in my project... I don't find the parameter yyou selected at 7:11. In my project, that's not a light but a character ( a cube that follows the player). Is that a problem?

    • @samuelmertens4116
      @samuelmertens4116 11 місяців тому

      ok, I forgot to put the variable as public.... and again, it's really the best casting tuto out there

  • @travelsimitaly2247
    @travelsimitaly2247 3 роки тому +1

    oh man, this is the best wildcard tutorial i have seen so far, finally i have discovered the correct way, thanks! sub +1

    • @GDXR
      @GDXR  3 роки тому

      Thanks for the sub!

  • @texmurph
    @texmurph 3 роки тому +3

    This is great, thanks! One question - is there a downside to using Sequencer to control lots of actors at once? Like if I want a trigger to turn off 5 lights, turn on 2, etc, I'll trigger a level sequence since this lets me easily time audio to go along with it, etc. I can use that to trigger changes in the level as well - to have geometry shift up and down that are controlled by parent actors, etc.
    I've generally been told that it's better to code everything instead, though, but over time haven't had any issues using level sequences, so am curious.

    • @GDXR
      @GDXR  3 роки тому

      Like normal it really depends on what your doing and the best aproach to it. From your description I'd also use sequencer but with interfaces so id give the actors an activate function/event and then use sequencer to fire them. This way you can make the re-usable and have other things active or fire them as well.

  • @corgilife241
    @corgilife241 Рік тому

    Very helpful and finally I get it!! Thanks!

  • @SherrinVargheseofficial
    @SherrinVargheseofficial 2 роки тому

    Thank you Sir.....................😍 I've struggled with this and how!!!

  • @conkerthesquirrel4331
    @conkerthesquirrel4331 2 роки тому

    Ty for explaining this! I literally had the same thought process with the wildcard. It constantly trips up my code because I didn't fully understand. Ty ty!

  • @maliciouscompliance6489
    @maliciouscompliance6489 Рік тому

    Excellent work!

  • @tahagungor9968
    @tahagungor9968 3 роки тому

    The best tutorial on the topic, you should definitely fo kore tutorials, youre a natural talent in teaching

    • @GDXR
      @GDXR  3 роки тому +1

      Thank you, I plan on doing more soon to cover similar topics.

  • @4ArtArtArtArt
    @4ArtArtArtArt 2 місяці тому

    I enjoy learning from your videos. I'm willing to give you a "Mega Thank You" upgrade but I have one question. You have mentioned you need a VR headset for this tutorial. My question is do you think that my iPhone would work to Raytrace like the headset instead?..and if so could you tutor your patreons on that. I don't have a VR headset but I sure do want to make a VR game eventually.

    • @GDXR
      @GDXR  2 місяці тому

      Hi, Sorry for the delay. But for this video you dont need a VR headset. The logic works for any and all projects. Unfortunatly i dont think an Iphone would work to fake a vr headset. Its also extremely difficult to build content for IOS as you require a Mac which i dont have.

    • @4ArtArtArtArt
      @4ArtArtArtArt 2 місяці тому

      @@GDXR well thanks for the reply. Good to know. It be nice to have both wouldn't it ahah.. Hope you do someday. Thanks anyways.

  • @markguilard
    @markguilard 3 роки тому

    Very interesting, thanks for your help, I had so big problems with the objet in cast. It was so confusing before

  • @RprtBak
    @RprtBak 2 роки тому +1

    This is fantastic!

  • @richmind5867
    @richmind5867 2 роки тому

    solid tutorial. much better details than other videos. do you have a video of just blueprint and step by step how to use it and why and how etc. thank you awesome video

    • @GDXR
      @GDXR  2 роки тому

      Not yet!, but I plan on creating one soon.

  • @antoniopepe
    @antoniopepe Рік тому

    Thanks for this deep explanation

  • @ibrews
    @ibrews 3 роки тому +1

    Excellent video !!

  • @blackivy011
    @blackivy011 3 роки тому +1

    Awesome explanation thank you

  • @mohamadalkotob2525
    @mohamadalkotob2525 2 роки тому +1

    amizing tutorial thx bro

  • @Chokwik
    @Chokwik 2 роки тому

    thanks mate! really helpful tuto, very good examples

  • @hendrixgreengilmour
    @hendrixgreengilmour Рік тому

    Thank you so much. Really appreciate this

  • @Nosferatu_tqegaming
    @Nosferatu_tqegaming 9 місяців тому

    Love this video. Did something with some
    of these principles. Then wanted to apply it to a mesh component that is attached to my 3rd person character. Couldnt figure oit how to add the BP functions.. Do i need to create the same blueprint but drag the static mesh component into the 3rd person event graph and then created the BP string? If i use the BP object in the world it functions fine so would the method i explained work for replicating the function on the same
    object but that is attached to the 3rd person mesh? please reply! 😅😂

  • @tedats
    @tedats Рік тому

    Great tutorial. I'm scared I might actually get it. First try worked!

  • @itanshi
    @itanshi 3 роки тому +2

    Suggestion for another video. When to use UMG Bindings and alternatives to them

    • @GDXR
      @GDXR  3 роки тому +1

      Great suggestion!, but for now. Allways use bindings when the infomation on the hud will be updated or chaged. You can then create an interface "BPI_UMG" which contains all the events required for your hud. All you need to do then is pass the infomation through the event to the hud. Just make sure your interface message has the correct refrence.

  • @heylesson6910
    @heylesson6910 2 роки тому +1

    Thanks so much, you helped me figure out where I was slipping up. I was trying to cast to a Player_UI blueprint. But couldn't figure out what to put in the wildcard object pin. I tried assigning the variable I created to be an "Actor" like you did in the video but it didn't work for me. Then I realised: wait, my thing isn't a light, like this guy's - my thing is a widget. So instead of "Actor" as a variable type, I needed to use "User Widget" - since that is the parent class. If anyone else is having trouble, ask yourself: "what is the parent class of the object I'm trying to cast to?" If you go to your blueprint window, it will tell you in the top right corner! :)

    • @heylesson6910
      @heylesson6910 2 роки тому

      spoke too soon i'm still stupid

    • @GDXR
      @GDXR  2 роки тому +1

      hey lesson. I have a (Current) 2 part series working with UMG and blueprints covering communication. Might be worth checking those out as they should help you get started.
      ua-cam.com/video/yeIJhAsiGsw/v-deo.html

  • @kalamwahed6525
    @kalamwahed6525 Рік тому +1

    I love it 👍🏽

  • @SSHEINI82736
    @SSHEINI82736 2 роки тому

    Great video, thank you very much!

  • @guillermo3dcode
    @guillermo3dcode Рік тому

    Im the like numer 900 ! I appreciate the info, thanks a lot men ! ❤❤❤❤

  • @Nosferatu_tqegaming
    @Nosferatu_tqegaming 9 місяців тому

    can you cast to a static mesh? from a blueprint actor or its function to a static mesh? ttying to get my component thats connected to my charcter to act like a BP actor

  • @DrSciencex
    @DrSciencex 2 роки тому

    This was awesome! Ty!!

  • @Noruzenchi86
    @Noruzenchi86 3 роки тому

    So interfaces is basically sending an event to all (specified) actors supporting that interface. Can you tell them to change to a specific material via the triggering actor like you have the actors to be triggered array, rather than on the actor to be triggered?

    • @GDXR
      @GDXR  3 роки тому

      Yeah, you would just have the envent set the material to the one you want. If i understand correctly.

    • @ChrisCohen
      @ChrisCohen 2 роки тому

      That isn't what an interface does. I can see how the video would suggest that though because it's a bit misleading. I love all the comments saying "best teacher ever" from people who now totally misunderstand interfaces!
      An interface just defines a contract that must be obeyed by everything that implements it. If you have a "light" interface, you might decide that everything that implements it MUST be able to turn on and off.
      You could have a ceiling light, or a desk lamp, or anything, but if it implements the "light" interface, you can guarantee it can be turned on or off. Hence why a cast isn't required.
      The interface itself doesn't know anything about the things that have implemented it. You can't ask it for a list.
      But what you can do is ask the level to give you a list of all things that implement the "light" interface (try not to do this for performance reasons). Or provide your own list as in the video.

  • @danielgiambattistelli7380
    @danielgiambattistelli7380 9 місяців тому

    one question. does the node DOES IMPLEMENT INTERFACE is of use in this case instead of the array?

  • @alhusseinali
    @alhusseinali Рік тому

    Dude!, you saved my life.

  • @OpenMawProductions
    @OpenMawProductions Рік тому

    This is a great tutorial. I just wanted to ask a question because i'm having a problem.
    So i'm trying to create secret area actors. Essentially it's just a trigger box that adds a tally to the "secrets" and displays a message. That's all good.
    Problem i'm having is i'm trying to get this actor to, on Begin Play, report to the Widget that it exists to be added to the total count.
    So Event Begin Play - > Final all widgets of class W_MainHUD -> For Each Loop With Break -> On Complete call BPI "UISecret Add Total"
    In MainHUD I have Event Ui Secret Add Total... and it doesn't seem to register at all. I just had it setup with a simple print string to see if the message was going through, and it's not.

    • @GDXR
      @GDXR  Рік тому

      Hey, so first thing that comes to mind is the order actors are loading into the scene at. It sounds to me that your actors and find all widgets of class are firing event begin play before your vrpawn has created/loaded the Widget blueprint to display the infomation. you can see if this is the case by adding a delay of a second or two after the event begin play. Giving everything enough time to load in before firing the event in the HUD. If you are still having issues, drop by the discord and we can help debug some more.

  • @Xanex60
    @Xanex60 2 роки тому +1

    TY so much !!!

  • @iSneakyPewPew
    @iSneakyPewPew 2 роки тому

    Thank you! I've been struggling to understand BP Interfaces and this helped bridge a knowledge gap for me.
    After watching some other videos, I was under the impression that you could just make an Interface with a Function and any blueprint you attached that Interface INTO would communicate through that. Basically a broadcast from any trigger containing that function that any other Blueprint (that also had that interface added) would be listening for and reacting to.
    Please correct me if I'm wrong, but it appears that it works more like a network where any blueprint with the Interface added to it is on the network, and can basically cast to any other blueprint on that same network.
    For instance, a button on that network (has the interface added) will do whatever you program it to do within the confines of other blueprints added to that network, like gathering an array of other blueprints to send a signal to. You could add blueprints to the array that were not on that network (haven't added the interface to) but they wouldn't comply because they aren't listening.
    In short, by adding the Interface to a blueprint, your giving the blueprint the option to communicate with other blueprints on the network (Interface), but you still have to specify which, because it's not a broadcast?

    • @conception3509
      @conception3509 2 роки тому +1

      Yes, I also expected it to broadcast the first time. But as you said you still have to input it. This can also be done based on proximity or by getting all actors of class or all actors with interface. You posted this comment a while ago so I guess youre already well on your way with interfaces. I wish you happy developing!

  • @arvideo2145
    @arvideo2145 2 роки тому

    I have never used blueprint interfaces but i have used Event Dispatchers. When should you use BPI instead of ED?

  • @nutchan1500
    @nutchan1500 3 роки тому +1

    I have a question.
    How can I add more actor to the array while the game is running?
    Like if I spawn a new cube that I want it to have its Active interface function tie to the pre-existing collision box.
    Also this video is great!

    • @GDXR
      @GDXR  3 роки тому +1

      Great question. of the top of my head on begin play you could cast or interface (If the refrence is correct) to the actor which contains the array. From there you just send the infomation through the cast node using an actor variable and then add it to the array. Check this video out to see how interfaces can send variable data.
      ua-cam.com/video/owHKbLBaOpA/v-deo.html
      Hope it helps.

    • @nutchan1500
      @nutchan1500 3 роки тому

      @@GDXR Thank you a lot. This is very helpful :D

  • @N3DArtworks
    @N3DArtworks 6 місяців тому

    Having so much fun learning UE that I don't even notice the sun coming up or going down to a point where I'm having problems with my BP. arghhh sleep,,,, why are you even a requirement!!!?

  • @marxmarjoneljovellano4091
    @marxmarjoneljovellano4091 2 роки тому

    Could you make tutorial for soft object reference?

    • @GDXR
      @GDXR  2 роки тому

      Epic Actually have an in-depth stream covering it so might as well learn it from the guys who make the engine lol. ua-cam.com/video/K0ENnLV19Cw/v-deo.html

  • @Lord_Volkner
    @Lord_Volkner 3 роки тому

    Ok, so if we have a dozen instances of light_bp in the level and when overlapping we want to access a variable in one specific light. How would we cast to that specific light?

  • @ili76767
    @ili76767 2 роки тому

    To my confusion, since you have selected the light in the viewport with a dropper, why use casting? Wouldn't it be better to just directly communicate?

    • @zablade
      @zablade Рік тому

      That's a public variable, which allows you to edit variables from outside the blueprint instance itself, like in the level editor.
      You could cast to things that are explicitly going to be loaded in the level, no matter what, like the player

  • @albertorossi282
    @albertorossi282 Рік тому

    I love you so much you saved me so much time

    • @GDXR
      @GDXR  Рік тому

      And I love you, random citizen!

  • @capitainebejita753
    @capitainebejita753 2 роки тому

    I can't convert the variable to an "Actor type" it stuck on loading & searching indexing in blueprint....

  • @pacocarrion7869
    @pacocarrion7869 3 роки тому

    In my case doesn't work. I create a BluePrint (Actor), with a variable (Transform) and a mesh. The variable picks up the position of the mesh (WorldTransform)
    I create another BluePrint (Actor), I use Cast To, in the input of the Object dont work any variable (actor, object..doesnt care which one) does not recognize it. Something is missing in this tutorial or I don't undestand how is working Cas to :(

    • @GDXR
      @GDXR  3 роки тому +1

      The wild card for your cast if the cast is correct "Cast to First Blueprint name" the wild card should be a variable of the type your first blueprint is so in variables search the name of the blueprint you created. From there you just need to reference the actor in the scene. If you need help with this, hop over to the Discord, you can then post some images and we will be able to help you out with it.

    • @pacocarrion7869
      @pacocarrion7869 2 роки тому

      @@GDXR thanks GDXR, for the answer I fix the problem

  • @DrekenProductions
    @DrekenProductions 3 роки тому

    awesome tutorial

  • @rremnar
    @rremnar Рік тому

    It's better to use a sequence than chain "what if's" together (Edit: For unrelated events).

  • @framex_media
    @framex_media 8 місяців тому

    Brilliant, thanks

  • @arkalexx
    @arkalexx Рік тому

    But if you put a sequence, you can run difference cast to no matter if the other run or not..

  • @dpnexus
    @dpnexus 2 роки тому

    I'm in UE4, followed exactly. Cast still fails ? is this UE5 only? I create a new variable type BP_Light (same name as the light bp) then get the 'note' warning, I convert it to 'actor' type.. it compiles. Cast still fails? Help! lol thanks

    • @GDXR
      @GDXR  2 роки тому

      if your getting a note warning its possibly your trying to cast to the actor your already inside of. The cast should be in another actor which is looking for the light.

  • @llYuki0okami
    @llYuki0okami 2 роки тому

    so Object Input in Cast To node is just asking us what instance we want to connect to, like we have Blueprint CAR, we put it to the level several times making several instances of it, when we Cast To Blueprint CAR unreal do not know with instance of it we wanna cast to.

    • @GDXR
      @GDXR  2 роки тому

      Yeah, it needs to know exactly what instance its looking at for the cast to work.

  • @croxyg6
    @croxyg6 7 місяців тому

    Losing my mind.
    All I want to do is pass a variable from a Pawn blueprint to an Actor blueprint. Both blueprints are dropped in the same Main scene. All of the the variables I want to pass are set to public. I have properly Set a Boolean Var in the Pawn BP, but when I try to Get that same Boolean Var (for example) inside the Actor BP, it requires a Target (self), which I cannot modify to point to Pawn's BP.

    • @croxyg6
      @croxyg6 7 місяців тому

      I've set up a Blueprint Interface with an Input and Output Booleans. It is set up in the PawnBP after the Boolean is Set, and is also set up in the ActorBP but the variable will not pass.

    • @GDXR
      @GDXR  7 місяців тому

      so the main issue here, is that the character is spawned after you press play so you can't set the reference. However, there are a couple ways of doing this. As you mentioned in your own reply. A blueprint interface is the best approach since you don't need to cast, however, you do need the target. Something you could do is do a search for "Get all actors of class" and run a for each loop from the array into the interface target. this will fire it in every actor you have in the scene if you have more than one.
      However, another approach is to have the actor cast to the player's pawn. From there the actor can just get the boolean variable. It's entirely up to you on the approach you take.
      If you aren't already, make sure to drop by the discord, it makes helping with questions like this much easier as screen shots can be shared.

  • @SoloGameDeveloper
    @SoloGameDeveloper 2 роки тому +1

    Thank you.

  • @arkalexx
    @arkalexx 2 роки тому

    Thank you. very usefull.

    • @GDXR
      @GDXR  2 роки тому

      You are welcome!

  • @EtzeNuegez
    @EtzeNuegez 2 роки тому +1

    thanks man, super helpful, also, i got 420th like lol

  • @dannyvelez6819
    @dannyvelez6819 Рік тому

    i likes the tutorial i need a simpler one though i think im trying to learn how to use interfaced for the first time and this tutorial while well made is still very confusing to me .

  • @nightwalkerj
    @nightwalkerj 2 роки тому

    So basically the "wild card" of a cast node is just referencing an actor already in the scene? If so, damn I wish someone would have said that sooner. Now it actually makes some sense.

  • @АлексНеВажно-х4г
    @АлексНеВажно-х4г 2 роки тому

    Everywhere, everywhere they make casts for the actor who stands on the stage, BUT no one shows how to make casts for the actor who should appear later!

  • @50shadesofskittles9
    @50shadesofskittles9 2 роки тому +1

    Great vid. Casting can get very expensive.

  • @skysoftware4581
    @skysoftware4581 3 роки тому

    Can you upload 1080p as 480 is unreadable

    • @GDXR
      @GDXR  3 роки тому

      This video is 1080p id recommend checking the settings on your end.

  • @TheChosenOne462
    @TheChosenOne462 6 місяців тому

    thats not turing on the lights thats more like turning it off

  • @ericmatthews9894
    @ericmatthews9894 2 роки тому

    Thank you for teaching and not "copy/paste what I do...what!? It didn't work!?...I don't know, sorry" like so many other tutorials.

  • @bart-kay
    @bart-kay 2 роки тому

    There is NO GODDAMN 'Blueprints' Folder in my project. Why cant you people who make these videos start at the beginning, and give us ALL the instructions step by step?

    • @GDXR
      @GDXR  2 роки тому

      Erm, this is the beginning. It's the default third person template. If your not using it then that would be why there isn't a blueprints folder. You can easily create one though or create a new project using the third person template.

  • @eddebrock
    @eddebrock 2 роки тому

    This made no sense.

  • @JohnRiversOfficial
    @JohnRiversOfficial Рік тому

    how can i have one collision sphere look only for meshes and not other collision spheres that is part of the mesh - and furthermore, do it actor-specifically, and not just look at primitive meshes