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

Поділитися
Вставка
  • Опубліковано 31 сер 2021
  • Updated Discord invitation: / discord #UnrealEngine #VR #VirtualReality
    ► Join the Discord: / discord
    ► Description
    Hey everyone, I struggled a lot when starting out with Blueprints especially with blueprint communication and I naturally ended up using cast nodes. So I thought id show you how to use them as well as why blueprint interfaces are actually better in the long haul. So I really hope you all enjoy it.
    In-depth Interface tutorial: • Using Blueprint Interf...
    -----------------------------------------------------------------------------------------------------------
    ► Patreon: / gamedevxr
    ► Twitter: / gamedevxr
    ► Instagram: / gamedevxr
    -----------------------------------------------------------------------------------------------------------
    If you're new to VR and want to get started with Oculus Quest development, I recommend watching these videos first.
    1. Installing UE4 from Source code (contains more up to date Quest features)
    • Installing UE4 4.25 fr...
    2. Installing Android Studio (Required to create Oculus Quest projects in UE4.25+)
    • Installing Android Stu...
    3. My Oculus Quest 1 Settings (These are different to the Quest 2)
    • My Oculus Quest 4.25 B...
    4. My Oculus Quest 2 Settings
    • Quest 2 Settings You S...
    -----------------------------------------------------------------------------------------------------------
    PC SPECS:
    ► RTX 2070 Super
    ► I9-9900K
    ► 32GB Ram
    ► 2TB SSD
    Equipment
    ► Keyboard: HyperX Alloy Origins
    ► Mouse: Anker® Ergonomic Optical USB Wired Vertical Mouse
    ► Mic: Trust GXT 232
    ► WebCam: Jelly Comb
    ► Screen: AOC I2367fh 23-inch LED x 2
    ► Headset 1: Oculus Quest 128GB
    ► Headset 2: Oculus Rift + Motion Controllers
    ► Headset 2: Oculus Quest 2
    ► Graphics Tablet: Wacom Cintiq 13hd
  • Ігри

КОМЕНТАРІ • 146

  • @JesseLeeHumphry
    @JesseLeeHumphry 2 роки тому +109

    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  2 роки тому +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 :)

  • @benjaminbristow
    @benjaminbristow 2 роки тому +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  2 роки тому +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 :)

  • @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!

  • @xenaisu
    @xenaisu 10 місяців тому

    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.

  • @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!

  • @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.

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

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

  • @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.

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

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

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

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

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

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

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

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

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

    Great vid buddy! Keep 'em coming and thanks!

  • @ecoclasico
    @ecoclasico Рік тому +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

  • @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.

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

    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.

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

    Very well explained, great examples. Thanks

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

    This was really helpful. Thank you.

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

    thanks mate! really helpful tuto, very good examples

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

    Very helpful and finally I get it!! Thanks!

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

    Great video, very good breakdown on communication through Blueprints.

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

    confirmed, it HELPED! Thanks a lot !!

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

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

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

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

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

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

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

    Thank you so much. Really appreciate this

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

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

  • @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 !!!

  • @Switch620
    @Switch620 Рік тому +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 9 місяців тому

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

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

    This was awesome! Ty!!

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

    Great video, thank you very much!

  • @DesertStormXQ
    @DesertStormXQ 2 роки тому +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  2 роки тому +1

      Your welcome, super pleased it was helpful.

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

    Excellent work!

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

    This is fantastic!

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

    Excellent video !!

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

    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.

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

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

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

      Thanks for the sub!

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

    Awesome explanation thank you

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

    Thanks for this deep explanation

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

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

  • @lucianosantoro7849
    @lucianosantoro7849 20 днів тому

    BEST TUT ABOUT THE TOPIC.

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

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

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

    TY so much !!!

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

    amizing tutorial thx bro

  • @travelsimitaly2247
    @travelsimitaly2247 2 роки тому +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  2 роки тому

      Thanks for the sub!

  • @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!

  • @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.

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

    awesome tutorial

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

    Brilliant, thanks

  • @kalamwahed6525
    @kalamwahed6525 10 місяців тому +1

    I love it 👍🏽

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

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

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

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

  • @kyoai
    @kyoai 2 роки тому +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 Рік тому

      @@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.

  • @texmurph
    @texmurph 2 роки тому +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  2 роки тому

      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.

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

    Dude!, you saved my life.

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

    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! 😅😂

  • @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 Рік тому +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!

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

    I love you so much you saved me so much time

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

      And I love you, random citizen!

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

    Thank you. very usefull.

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

      You are welcome!

  • @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.

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

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

  • @JPN767
    @JPN767 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!!!?

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

    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?

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

    Thank you.

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

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

  • @lildevilgamer
    @lildevilgamer 2 роки тому +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 2 роки тому +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  2 роки тому +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.

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

    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

  • @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

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

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

    • @GDXR
      @GDXR  2 роки тому +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.

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

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

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

    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 5 місяців тому

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

  • @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.

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

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

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

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

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

    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

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

    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  2 роки тому

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

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

      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.

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

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

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

    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.

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

    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  Рік тому

      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.

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

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

  • @dannyvelez6819
    @dannyvelez6819 10 місяців тому

    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 .

  • @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

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

    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  Рік тому

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

  • @nutchan1500
    @nutchan1500 2 роки тому +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  2 роки тому +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 2 роки тому

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

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

    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  2 роки тому +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

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

    Great vid. Casting can get very expensive.

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

    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 Місяць тому

      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  Місяць тому

      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.

  • @user-zq9gq5nr6o
    @user-zq9gq5nr6o Рік тому

    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!

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

    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.

  • @TheChosenOne462
    @TheChosenOne462 14 днів тому

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

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

    Can you upload 1080p as 480 is unreadable

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

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

  • @bart-kay
    @bart-kay Рік тому

    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  Рік тому

      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