How To Use AnimatedSprite2D with AnimationPlayer In Godot 4.2 In 10 minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

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

  • @scottisitt
    @scottisitt 15 ชั่วโมงที่ผ่านมา +1

    Just what I needed! Thank you!

  • @austinmcc15
    @austinmcc15 3 หลายเดือนก่อน +6

    I was procrastinating on watching a video afraid I'd have to redo all my sprite frames after setting up the AniSprite2D. Thanks man, huge timesaver!

  • @Jawtrick
    @Jawtrick 3 วันที่ผ่านมา +1

    You are a godsend my brother, great job!

  • @rlkeyn
    @rlkeyn 4 หลายเดือนก่อน +6

    This saved me after wasting 2 days in trying combine sprite sheets. Thank you so much

  • @Kazner0h
    @Kazner0h 5 หลายเดือนก่อน +20

    Apparently you don't need to add in every frame? After setting up the AnimatedSprite2D, it looks like you only need to add the first and last frames in the AnimationPlayer's "frame" track, and then set the track's Update Mode (the line on the right-hand side of the track, underneath the time) to "continuous." Once you've done that, it will just interpolate between the first and last frames, meaning it will go through the frames of the animation you set up in the AnimatedSprite2D.

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

      this helped! thanks!

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

      Thank you!! This was a fantastic tip

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

    This really saved me a lot of time and a bunch of extra work! I really appreciate you taking the time to make this tutorial. Thank you!

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

    Thanks :) I finally understood how to have an animationPlayer with an animatedSprite2D, wow it's great :D

  • @justbreathe1
    @justbreathe1 7 หลายเดือนก่อน +1

    I was literally needing this. thanks

  • @jpowens2010
    @jpowens2010 6 หลายเดือนก่อน +1

    Thank you so much - this was exactly what I was looking for.

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

    Is there a way to just play the animation instead of setting up the frames? I guess you could add script with a custom property that you control in the animator. Bit of a pain though, wish this was built-in

  • @mmy4328
    @mmy4328 7 หลายเดือนก่อน +3

    Wondering how would you scale this setup to many characters.
    Let's say I have 20 characters and each has their sprite sheet. Do you manually create 20 scenes, each scene has the exact setup?
    Or can they share the AnimationPlayer in a smart way?

    • @CodingQuests
      @CodingQuests  7 หลายเดือนก่อน +1

      you only need 1 scene for the player, you can easily switch out sprite sheets in many different ways. or load up all the animations into a few different nodes, etc. there are many ways to solve the problem you have

    • @strathallanguy
      @strathallanguy 7 หลายเดือนก่อน +1

      I've had some success with an add on called animated sprite to animation player . Search in the asset library. Then just run the script

  • @pryzmgaming
    @pryzmgaming 3 หลายเดือนก่อน +2

    Great so far but i have encountered an issue where my character moves correctly however the animations are stuck on walk and idle forward, they never switch to the other directions when moving in those directions. I am familiar with blendspaces and state machine trees coming from an Unreal and Unity background where they are very similar, however in those engines its pretty much automatic for the animations to work, you dont need to script the animations to fire.
    I jumped into godot thinking it would be quicker and easier than those engines but as far as animations for movement and troubleshooting problems it sadly has not been the case.

    • @CodingQuests
      @CodingQuests  3 หลายเดือนก่อน +1

      Godots animation system can def use some work tbh, but I think it's current setup isn't too bad since you can have more control over it through code

  • @ashharkausar413
    @ashharkausar413 4 หลายเดือนก่อน +2

    Hey Omar, idk if you've ever run into this problem before, but animation player acts strange. For example, I create a new animation dash and it won't play in game. It also won't play on the track either. However, the name will show but it will play idle animation. Do you know how to get around this? Or is this some bug? $AnimatedSprite2D works fine. And oh, I notice the animationplayer only plays the animation if I had clicked an animationsprite2d animation on the dialog. And it will only play that nothing else.

    • @CodingQuests
      @CodingQuests  4 หลายเดือนก่อน +2

      I havent run into this issue before. Maybe if you share a bit more detail in my discord, someone can help.

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

      @@CodingQuests ty

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

      @@CodingQuests I figured it out. I didn't create the character as a scene. AnimationPlayer is working fine now!

  • @lay2BH
    @lay2BH 3 หลายเดือนก่อน +1

    I know this is late but I have an error that runs whenever I attack an object. Invalid call. Nonexistent function 'getparent' in base 'Area2D'.

    • @lay2BH
      @lay2BH 3 หลายเดือนก่อน

      Never mind, all I missed was an underscore. Great tutorial, thank you.

  • @Flamebamboo
    @Flamebamboo 6 หลายเดือนก่อน +2

    Whats the point of using animation player and tree node why cant we just use animatedsprite2d and play animation when we want in the script

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

      try animating ur player without it, and eventually youll see why : )

  • @bluefox7628
    @bluefox7628 6 หลายเดือนก่อน +1

    wait so am currently using only animatedPlayer2d and i have a (idle, jump, run, hit, fall) when i am doing nothing it idles, when am jumping it jumps when am not it falls, when i run it runs, but when i get hit it overrides with idle or run since there is no priority in it. and also if there is a way to contact you ill be more than happy to do so ❤

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

      join discord : )

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

      @@CodingQuests alright man

  • @JasonEllingsworth
    @JasonEllingsworth 7 หลายเดือนก่อน +2

    I think you could slow down a bit. You move your mouse all over the place and are a bit erratic. I know lots of other hyperactive people probably just love you, but I think for your target audience who is people very new to godot, you are probably moving fast and not being as verbose as needed to fully explain everything like a teacher would in a classroom setting.

    • @CodingQuests
      @CodingQuests  7 หลายเดือนก่อน

      yeah, ive gotten this complaint a few times, my only concern is that watch time will be lower with a much longer video than needed. you can also set the video to x0.75 or smt, but regardless i do agree, that i talk fast a lot of the time lol. Ill do my best to talk slower in the future!

    • @JasonEllingsworth
      @JasonEllingsworth 7 หลายเดือนก่อน +2

      @CodingQuests yeah you'll have people that want it both ways, and for intermediate subjects going faster is fine. But slowing down videos sounds terrible

    • @CodingQuests
      @CodingQuests  7 หลายเดือนก่อน

      @@JasonEllingsworth yeah i understand that. Its def hard finding the sweet spot from my perspective