Tweens are AMAZING in Godot 4.3

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

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

  • @ChaoszZChannel
    @ChaoszZChannel 5 หลายเดือนก่อน +22

    Most videos on tweens were underwhelming when i was trying to understand them, either outdated or straight up wrong in some cases, the docs were the only place that was actually explaining them in-depth, so this is very much such a great addition for video tutorials. Great work keep it up!

    • @cashewolddew
      @cashewolddew  5 หลายเดือนก่อน +2

      I'm really glad this is on par with your expectations! I'm happy to hear it has been helpful! 🥜

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

    What an absolutely phenomenal video. Was just thinking about how necessary an in depth tweening video is

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

      It's great to hear that! Are there any other topics that you'd like to see covered in depth? 🥜

  • @Joao-bq4ys
    @Joao-bq4ys หลายเดือนก่อน +1

    Thanks for the excellent content, now I can do Tweening!! I thought the Cooler Daniel part was really cool!

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

      Ha ha, I'm happy you enjoyed that! 🥜🥜

  • @Whhatt
    @Whhatt 5 หลายเดือนก่อน +2

    This video is actually very helpful. I've finally understood what tweens are used for

  • @Girouetten
    @Girouetten 5 หลายเดือนก่อน +2

    this is the best tutorial about tween, you are the best

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

    Know that your the lifeline for godot devs in animation specifically 😂

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

    There is so much you can do with tweens!

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

    only thing I'd add is that get_tree() should generally be omitted and Node's create_tween() be used instead.
    this will automatically bind the tween to the node without the need to explicitly call bind_node().
    this is generally desired so that the tween will automatically inherit the bound node's process state and is freed together with the node.

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

      That's a fair point! get_tree.create_tween() could prove more useful for global tweening which is node independent, but otherwise, a node's create_tween() method seems to be the way to go in most cases. Thanks for the insightful comment! 🥜

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

    That is so cool. Great work!

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

    Tweens will relax my _process functions!
    Thank you for that video, never heard of tweens.

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

      It's never too late. I'm sure they'll help a lot in the future!

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

    extremely well made video, thank you

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

    Please do more tutorials related to godot 🙏

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

    Tween_callback! Thank you sir. I've been trying to implement a ledge grab/climb mechanic and couldn't figure out how to wait for the tween to finish to move on to other code. I just used a signal when the climb animation finished, but this should work better I think

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

      I'd love to hear from you once your game is finished. Hope it turns out great and I'm glad I could help! 🥜

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

    That was very useful! Thanks

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

    Is it possible to add a curve to the tween?
    Right now I have a working tween which is a straight line from Point A to Point B, but is it possible to curve the "travel" from A to B?

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

      There's a really neat trick you can do by using a PathFollow2D. That way, you make the object follow a path, but you control its speed and acceleration through the tween.

  • @jeremysharpe5467
    @jeremysharpe5467 14 วันที่ผ่านมา +1

    I think there's a mistake around 17:30. You set the tween to parallel, but the issue is that it runs the up and down movement at the same time for each child, which ends up ONLY showing the downward movement. I hope if you rewatch it it's clear what's wrong. They don't move up and down, only down at 17:35. Is there a way to make each child parallel, while having the up and down property tweens run sequentially, or would a separate tween be required for each child?

    • @cashewolddew
      @cashewolddew  14 วันที่ผ่านมา

      Woah, I think you're actually right! At first I thought that my game just didn't load in time to see the upwards movement. I think that happens because we are affecting the same property (position). If you look at the previous example, at 14:52, you'll notice that both scaling and moving the sprite work at the same time. Right now I can't think of a better solution than simply adding a delay to your down movement tween. For example, you could write: tween.tween_property(child, "position", Vector2.DOWN * 50, 1).set_delay(1). However, I'm not able to test this right now, so please let me know if it works for you :) 🥜

    • @jeremysharpe5467
      @jeremysharpe5467 14 วันที่ผ่านมา

      @@cashewolddew I came across the solution which is "Tween.chain":
      "Used to chain two Tweeners after set_parallel() is called with true"

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

    This was great!

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

    Great tutorial!

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

    Uses Godot 4.2.2. Changes title to Godot 4.3 for views. Naughty boi.

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

      This was bound to be noticed by someone 😅🥜
      However, I only change versions when I know for sure that nothing regarding the subject in the video changed between versions, basically saying that the tutorial is up to date.
      Thanks for pointing it out, though. I'll make sure to also write that in the description.

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

    Awesome video. Thanks for posting.
    In a future video, could you talk about tweening inside the process/physics process functions?
    I'm currently using tweens to move a creature to another creature's location while both creatures are already moving. I've only found this to be possible if I tween within the aforementioned functions. If I don't, creature A will move to creature B's old position instead of its current position. While I figured this out for myself, I'm not sure if it's ideal, and it certainly leads to some unintended results if my parameters aren't perfect.

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

      Thanks for the comment!
      What you're telling me sounds like target seeking or even pathfinding. I actually have a video which makes a fish follow the mouse (so basically, one character following another moving "character" if you consider the mouse a character).
      Wouldn't something like that work in your case?
      Anyway, I'll make sure to write it down and think of something in this regard in the future if you don't find a solution.
      Let me know if this helps you! 🥜

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

      @@cashewolddew I have a main character that moves with WASD. There are three monsters that follow him in formation. There are hordes of enemies that spawn and use navigation agents to find and attack the player.
      As this is going on, the player's monsters attack enemies that enter their radius. The attack as well as their return to their starting position both use tweens.
      Thanks for the reply! It's probably hard to conceptualize what I'm doing without a demonstration, but thank you nevertheless.
      I hope to learn more about how tweens operate in the process/physics process function so that I can better execute on this idea.

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

      @@Crono2448 Maybe it would be a good idea to make a discord server for people in the community who'd want to help each other. I'll think of a way to apply that.

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

    Thank you

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

      I'm happy it helped!

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

    How we can handle multiple tweens, for example, animating slots in a hotbar (mouse entered, mouse exited), when player can move the cursor very fast to trigger many slots at once? I am stuck with this right now as I am tweening positions slight, but the result is not quite good enough... the slots move out their original positions permanently if many tweens are triggering too fast.

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

      By the way, the same not happens to Scale property... i realy don't know what's the catch with Position property... even persisting the original position to ensure the tween correctly, the bug still happens.

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

      Wow! I just solved it! mouse_entered: tween.tween_property(self, "position:y", -50, fade_seconds). mouse_exited: tween.tween_property(self, "position:y", 0, fade_seconds). I guess my fault was using whole position as Vector2, adding and subtracting the values... Anyway, very nice tutorial brow!

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

      Ha ha! I'm super glad you figured it out 😁 🥜

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

    Excuse me
    Could you explain how you performed the action at this specific point in time 5:44 ?

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

      Sure, I did that by pressing Ctrl + /.
      If you're on a mac, the shortcut should be Cmd + /

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

    Cool 😎!

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

    Why not just create an animated scene and set the platform to move between the two key positions seamlessly? You can even set the curve for linear movement or so the platforms are slower on take off and landing with a click of a button.

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

      That's a great question. Truth is, there are many ways of achieving the same thing in Godot. However, some functionalities are better at achieving a result than others.
      There are benefits and downsides to both cases. The AnimationPlayer adds another node to the scene, while a Tween could be created as a one-shot. For simple animations, Tweens are generally easier to configure and parametrize. Try them both and see which best fits your needs!
      Hope this answers your question! 🥜

  • @Vexcenot
    @Vexcenot 5 วันที่ผ่านมา

    15:20
    5:12

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

    Good video but nothing here is new in 4.2 - the title is a bit misleading. In fact you don't even need get_tree() these days. You can just call create_tween().

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

      Hmm, I think you're right. I can see how one could understand that there are some new features for tweens in Godot 4.2.
      However, my intention was just to specify for which version of Godot this tutorial is, similarly to how I do on most of my other videos. Thanks for letting me know. I'll pay more attention in the future. 🥜

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

      Correct me if I'm wrong, to my understanding get_tree().create_tween is used to make the tween independent of the node and create_tween binds the tween to the node as an alternative to doing get_tree().create_tween().bind_node(self), so there are uses for both cases right ?

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

      @@ChaoszZChannel A tween created with the scene tree will not be tied to the node, meaning that it will keep animating even if the node is freed, but will finish automatically if there's nothing else to be animated.
      In the other case, you're right, create_tween() called on a node will automatically bind that node to it, which automatically kills the tween when the node is freed.
      I generally like creating SceneTree tweeners because they can be used to animate more stuff, even if I freed one of the nodes I was animating, but I think this is a very fair point to be made, that there's a difference between these.
      Thanks a lot for this! 🥜🥜