How To Use AnimationTree In Godot 4.2+ In 12 minutes

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

КОМЕНТАРІ • 30

  • @xTriplexS
    @xTriplexS 3 місяці тому +2

    Great tutorial! Never thought I'd miss Unreal's transition rules. Never done it in code actually, so this was refreshing

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

    I removed the looping for the attack animations and I was still having issues. I printed the animation names at the start and end signals of the animation tree and saw that the idle animation was being fired immediately after the attack, cutting it. So I changed in the animation tree "Auto" to "Disabled" in "Advance mode" in the Attack node of (the arrow UI), that fixed it

  • @phoxsillanpaa9889
    @phoxsillanpaa9889 21 день тому

    If you're having the issue where the attack animation continues playing, it could be because your attack animations are still looping. There are three options in looping animations. There are two that look like swirly arrows, one where the arrows are blue, and one where they are not, And one that kinda looks like this |---| Don't use that one. Use the arrows that are not blue. By verifying this, I was able to get the AnimationTree Node to throw _on_animation_tree_animation_finished(anim_name: StringName). Godot 4.3

  • @qingxian3870
    @qingxian3870 5 місяців тому +3

    thank bro❤

  • @ProjectEpochGaming
    @ProjectEpochGaming 3 місяці тому +2

    i counted 4 separate, and meaningful clicks and a slight of hand ctrl+s within 2 seconds and all you said is " turn this off and see if it works"(with no explanation of what you clicked to turn what off) to a fluent user thats not a problem, first time user of this program and i had to watch the same 3 seconds back 5 times.... its going to take us HOURS to get through the video, it wont hurt you to slow the pace just a bit.
    its a BEGINNERS tutorial, not an intermediate or casual users tutorial.

  • @AKclub-wv5cq
    @AKclub-wv5cq 5 місяців тому +1

    You are the best and you are successful 😀

    • @CodingQuests
      @CodingQuests  5 місяців тому +1

      Idk if I'm successful yet but thank you 😂

  • @boswellsoccer
    @boswellsoccer 5 місяців тому +2

    The AnimationTree signal doesn't work for me on Godot 4.2.2 (it never triggers), so I used a Timer with 0.55 wait_time that attack input starts. Using the timeout() signal, I turn attacking to false. The timer also doubles as a CD for attacking so it isn't even a workaround, but a different way to handle the situation with positive side effects.

    • @CodingQuests
      @CodingQuests  5 місяців тому +1

      yeah for sure! thats a really creative solution. Good work!

  • @Random4Logic
    @Random4Logic Місяць тому +1

    for a 3D Character it seems completly different.
    First of all you need to create a "State Machine" Node in the AnimationTree Editor. Then you can create the state machine. I dont know where the state machine in this video comes from its not shown.
    also the .travel function seems to be somewhere else as the AnimationStateMachinePlayback does not have a function ".travel()": "anim_tree.get("parameters/StateMachine/playback").travel(...)" does not work

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

      ah there are different Tree Roots for the Animation Tree. That makes sense

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

    Hi, i just want to ask if you still need to multiply delta into velocity. To my knowledge, delta is already taken care by the engine for Velocity. That's the reason why you need 5000 speed to not move slowly, its because you essentially multiply delta twice.

  • @maheryrazafindralambo9679
    @maheryrazafindralambo9679 Місяць тому +1

    Hello there, do u happen to know how can I change the speed_scale in the new animation_tree?

  • @SEOmaster_real
    @SEOmaster_real 5 місяців тому +1

    You life saver❤ tnx bro

  • @panwladca8800
    @panwladca8800 5 місяців тому +1

    So you have to have all your animations set up in the animation player before hand ? This just gives more room to adjust details, animation flow etc? I wanna make sure I understand correctly.
    Say I want to make a beat em up style side scroller. I have "attack1" and I connect it to "attack2" same input different animation. Will this work to create a combo effect and then allow me to change the DMG value of the second attack ?

    • @CodingQuests
      @CodingQuests  5 місяців тому +1

      if you want to use animtree, then yes. otherwise its up to you.

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

      @@CodingQuests thank you

  • @trapdoort3297
    @trapdoort3297 5 місяців тому +2

    Hey while this tutorial is great I feel I might be a bit lacking, as I followed along but once my player attacks it can no longer move and I get an error stating "AnimationNodeStateMachinePlayback: parameters/playback" essentially telling me its cutting the animation as a result detecting one or more looped transitions. I double checked to see if I left anything on loop but I haven't so I'm unsure where I've mistepped. Does anybody have any idea where I went askew?

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

      See my comment. You are probably having the same issue I did where the AnimationTree signal never fires. Throw a print statement in that func and see if it ever prints. That's the fastest way to check a function gets called or not. You can also use the debug tool of course.

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

      @@boswellsoccer You Sir are a wonderful being. Thank you and that did put me on the right track to solving my issue. I do have to wonder what animation is looped that is negating the AnimationTree Signal from working as intended to begin with.

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

      @@trapdoort3297 I suspect it is the Attack to Idle Advance prop being set to Auto. It seems the engine views this as a queue and doesn't send the animation_finished signal after Attack because Idle is queued up. And Idle loops, which also disables the signal. Double womp

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

    i cant get one tutorial to work in any context i don't get it doing this for weeks nothing works

  • @AJ-fw6pn
    @AJ-fw6pn 4 місяці тому +1

    When moving down and attacking, the attacking flag is set to true, but does not play, and then not automatically turned off. When this happens, all movement is disabled, as expected. However, this issue does not happen with any other direction. Does anyone have any thoughts on what the issue could be? I saw the comment about using a timer, but I'd rather identify the issue with moving down and attacking as all other directions are working.

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

      For myself, I didn't realize that the looping toggle on the attack animations has more than just an "on" and an "off" setting, there's a third one as well, which I had accidentally selected. Fixed it for me once I noticed that.

  • @vesogry
    @vesogry 5 місяців тому +2

    Does someone have a good explanation for AnimationTree:
    Animation
    Blendspace1d
    Blendspace2d
    BlendTree
    StateMachine
    Why use blendtree, instead of a blendspace2d or Animation for a top down 2d rpg?

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

      BlendSpace1D:
      Best for animations that vary along a single axis (e.g., walking speed)
      Smoothly interpolates between animations based on a single parameter
      BlendSpace2D:
      Ideal for animations that depend on two variables (e.g., movement direction and speed)
      Allows for more complex blending in a 2D space
      BlendTree:
      Offers the most flexibility for complex animation logic
      Useful for creating custom blending behaviors and hierarchical animation structures
      StateMachine:
      Perfect for distinct animation states with clear transitions (e.g., idle, walk, jump)
      Provides a clear visual representation of animation flow and logic
      Choice depends on the complexity of your animations and the number of variables affecting them. StateMachine is great for overall animation control, while BlendSpaces and BlendTrees offer more nuanced blending within states.

  • @Amipotsophspond
    @Amipotsophspond 5 місяців тому +1

    so basically godot made it really really easy to make a state machine so long as you use the animations to do it, lol.

    • @CodingQuests
      @CodingQuests  5 місяців тому +1

      not exactly no. bcuz state machines are controlled through code as well. Youll see later on in the series what i mean :)

  • @ProjectEpochGaming
    @ProjectEpochGaming 3 місяці тому +1

    please slow your mouse cursor down. you move it SO MUCH i cannot keep track. i literally have to slow playback to .5 speed to see where youve clicked half the time. take your damn hand off the mouse while you talk. its like following a schizophrenic mouse down a hallway of mirrors.