2D Sprite Sockets in Unreal Engine 5 - Paper 2D Basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ม.ค. 2025

ความคิดเห็น • 36

  • @CobraCode
    @CobraCode  ปีที่แล้ว

    Get my 12 hour course on how to make 2D games with Unreal Engine:
    tinyurl.com/Ultimate2D
    Support the channel on Patreon:
    www.patreon.com/CobraCode

  • @brandonjacksoon
    @brandonjacksoon ปีที่แล้ว +1

    Always awesome tutorials!

  • @brandonjacksoon
    @brandonjacksoon ปีที่แล้ว +1

    Thanks mate! Another great tutorial!

  • @trollgasm
    @trollgasm ปีที่แล้ว +4

    You mad lad. I was about to waste away my entire weekend doing research on how to properly combine niagara particle system with PaperZD, and you release this video. That's hilarious.

  • @compatriot852
    @compatriot852 ปีที่แล้ว +2

    Yet another great video.

  • @MoistTheWetOne
    @MoistTheWetOne 18 วันที่ผ่านมา +1

    Great tutorial! I completed your course a while back and I've been working on my game since, but I was wondering how one could set directionality for a socketed sprite? Lets say I have 8 hat sprites I want to change between when my character is facing 8 different directions, how could that be implemented?

  • @wolfpawz321
    @wolfpawz321 2 หลายเดือนก่อน

    Hi thanks for the tut. When the player runs the particle system stays in the same position so basically it doesn't stick to the sword. It will be behind the player for example if the char is running right. Or falling from.the air the particle.loction will be offset above the player if you know what I mean

    • @CobraCode
      @CobraCode  2 หลายเดือนก่อน

      If you spawn an emitter you can spawn it as 'attached' or not.
      That's probably what you want to do

    • @wolfpawz321
      @wolfpawz321 2 หลายเดือนก่อน

      @CobraCode thanks man. Is there a way to play a sprite sheet animation for a particle effect? Like when he slashes it plays an additional flip book?

    • @CobraCode
      @CobraCode  2 หลายเดือนก่อน

      @@wolfpawz321 There's probably some way to do it with niagara, however for simple implementations I just create an actor blueprint.
      Then put in the flipbook.
      On beginPlay set looping to false.
      Then hook up the Finished playing event on the flipbook and call destroy actor from it.
      Then you just spawn that whenever you want to play the effect.
      Of course that's just a very simple implementation and you might wanna use pooling and other things for more advanced methods. Or look into how to do it with niagara.

  • @PsychoticaYT
    @PsychoticaYT ปีที่แล้ว +1

    When I add a ParticlePos socket to the impact frame of the sprite, it adds a ParticlePos to every other frame of my attack animation as well. Then itll only take the socket pos of the first frame and emit it there instead of the intended frame.
    Edit: Interestingly enough, when i mash the button quickly, the particles emits from the second frame, but the bullet wont appear from the socket at all

    • @CobraCode
      @CobraCode  ปีที่แล้ว

      Hey, the ParticlePos being added to all other frames of the flipbook is the desired behavior and shouldn't have a negative impact.
      I'm still not sure about the specifics, but yeah sadly sprite sockets can be a bit buggy sometimes.
      I had cases where everything works perfectly fine, but other cases where I had issues like things being 1 frame early or late.

  • @Spamkromite
    @Spamkromite ปีที่แล้ว +1

    That hat is so Layton, I love it ❤
    Thanks for sharing this. I was wondering how to make the hats to attach to all the sprites without changing the sprites of the protagonist to match each of the millinery collection they can get in the game. They are only cosmetic but players like collecting hats, I know for a fact 😜

  • @baladidoggames
    @baladidoggames ปีที่แล้ว +1

    Hey there! Awesome video!
    I'm running into an issue with using bulk edit to modify the socket locations of multiple sprites like you did in this video. Someone on the Unreal forum suggested it might be a versioning difference. Would you mind sharing what version of UE you ran during this video?
    Or can you think of any other reasons why it might not be working in my project? The only difference I can think of is that my sprites are quite a bit larger than the one you used in the video.
    Thanks!

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      Hey!
      I've been using this method all the way from 4.27 up to 5.3 and haven't had any issues with it.
      I believe the name changed in 5.2 though from bulk edit via property matrix to bulk edit assets or something like that.
      That is quite strange, but sadly I don't really know why something like that would happen :(
      Sorry I can't be of much help with this one!

    • @baladidoggames
      @baladidoggames ปีที่แล้ว +1

      @@CobraCode Thanks! I'm on 5.1 still so I suppose that's not it. I did manage to find a workaround at least. It still lets me copy and paste the entire socket (or list of sockets) which then carries over the location. Still weird how I can't change the location directly though.
      I appreciate the help either way!

    • @alaabahattab
      @alaabahattab 4 หลายเดือนก่อน

      @@baladidoggames How did you solve it? I can create the socket on all sprites but they don't show on the flipbook, it is driving me nuts...

  • @bez_znaczenia
    @bez_znaczenia 28 วันที่ผ่านมา

    Okay and these sockets can be used e.g for switching things?
    So e.g 1 weapon shoots projectile A, then you press e.g button 2 and you switch to weapon 2 that shoots projectile B?

    • @CobraCode
      @CobraCode  26 วันที่ผ่านมา

      All the sockets provide is a location in 3D space.
      So if you want to change what the gun you're holding looks like then yes you can just change the sprite that is attached to the socket.
      For switching which projectile is being shot you'll just have to implement some blueprint logic or C++.

  • @Whetzell
    @Whetzell 5 หลายเดือนก่อน

    Can I link sprite sheets to do this? Fore example if I have an idle of a character can I have a matching sprite sheet with just his face on it that overlays onto the body sprite sheet while still keeping them separate? Or maybe a flipbook socket?

    • @CobraCode
      @CobraCode  4 หลายเดือนก่อน

      Yeah something like that should work.
      You'd attach one flipbook to another through the sockets.
      Then you'd have to tell both flipbooks which animation to play when.

  • @西正西米
    @西正西米 ปีที่แล้ว

    In UE5.3, when setting the "Parent Socket" of the Hat to "HatSocket," the Hat becomes invisible. However, when setting the "Parent Socket" to "None," the Hat becomes visible again. Is this a bug in UE, or is there an issue with my settings? I have confirmed that in the Sprite settings, the created Socket is indeed named "HatSocket."

  • @bilursag
    @bilursag ปีที่แล้ว

    Hey, great tutorial, I got a question, how would you do a run to stop and then, the idle animation in PaperZD?

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      With PaperZD if you click on a transitional condition you can put in a transitional animation!
      This might work for your case.

  • @datsmabowl
    @datsmabowl 5 หลายเดือนก่อน

    Thanks for your great content!
    Question: As there is no sprite compositing system for PaperZD, I was hoping to use this system to implement a character customisation system for hair, clothing, facial features etc, but I still wish for a way of compositing sprites, it would make everything so much simpler! Do you have any thoughts or guidance for how something like this could be implemented in UE5? Thanks so much!

    • @CobraCode
      @CobraCode  5 หลายเดือนก่อน +1

      Hey, that's actually something I would also like to have in PaperZD and told the creator about it as a feature request.
      It is something very hard to implement though, so I don't think this is on the top of his priority list.
      Outside of that you'd have to put something together using sprite sockets which can also be used with PaperZD.
      There was a bug fix recently with sockets sometimes updating delayed in PaperZD, but I think base Paper 2D by itself has sometimes cases where the sockets are not updated consistently, so that's another issue.

    • @datsmabowl
      @datsmabowl 5 หลายเดือนก่อน

      @@CobraCode Thanks for the reply, I'll give it a go :)

    • @datsmabowl
      @datsmabowl 5 หลายเดือนก่อน

      Do you think perhaps there could be a way of using code to call from an external sprite composition directory and create new flipbooks like this on the fly? I'm a bit of a beginner so not sure how complex this would be!

    • @CobraCode
      @CobraCode  5 หลายเดือนก่อน +1

      @@datsmabowl Unreal is very expandable and there's also python scripting support, so I believe something like this is probably possible.
      It would take a lot of time and effort though.

  • @alaabahattab
    @alaabahattab 4 หลายเดือนก่อน

    I added the socket to all the sprites and it still doesn't show on the flipbook after creating it.

  • @Therizin0
    @Therizin0 4 หลายเดือนก่อน

    This is method-adjacent to sockets - apologies if it's too out of left field: if I have a character who has separate sprite sheets for clothes matching his animations, how do I have the clothes and guy follow a single AnimGraph, when the main character can only have his one AnimBP+AnimSources - Do they all need a seperate AnimBP?

    • @CobraCode
      @CobraCode  4 หลายเดือนก่อน +1

      Yeah I believe there is currently no way to share an anim bp for multiple parts and you'll have to make them separately.
      If you heavily rely on split up animations and maybe also on bones then looking into spline and the sdk they have for Unreal Engine might be useful.

  • @madeeasy7148
    @madeeasy7148 6 หลายเดือนก่อน

    Is this possible to do with multiple weapons? Like a pistol, then a rifle ect? Thanks

    • @CobraCode
      @CobraCode  6 หลายเดือนก่อน

      Hey, yeah that should be possible with this system!

  • @SuAimz
    @SuAimz ปีที่แล้ว

    Can you make a tutorial for parallax with an orthographic camera?

    • @CobraCode
      @CobraCode  ปีที่แล้ว +1

      Thanks for the suggestion. It's on the TODO list... but so are hundreds of other videos ^^