1D Animation Blend Trees Explained (Unity Tutorial)

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

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

  • @TimM-kz1vl
    @TimM-kz1vl ปีที่แล้ว +5

    Not only is this well-narrated, it's also super thorough. Thank you so much! Subbed!

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

    Super clear tutorial, thanks! It's worth noting, when she renames magnitude and speed, she is changing all occurrences, might not be clear to some.

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

    You helped me a lot, now I am a more advanced developer. I started with game development way back in 2018, but this is the year I am running a channel that will have devlogs and other game dev related videos.

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

      Great to hear 😊

  • @waowao-n9f
    @waowao-n9f 2 หลายเดือนก่อน

    This Series is So Good!

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

      Thanks for this comment 😊

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

    Hello, waching your tutorials since days, very clear and accurate, perfect “straight to the point” lessons, no useless bla bla.
    I have a question: How do we line up especially walking animation, as you mentioned at the end of this tutorial?
    Thank you very much!❤

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

      Ok I’ve got the answer by your root motion tutorial, thank you👍🏻

  • @Rachoszsky
    @Rachoszsky 3 ปีที่แล้ว +3

    Really enjoying this series, thanks! Keep it up :-)
    Would love to see a video on root motion!

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

      Great to hear this 😊
      We're planning a couple of videos on root motion at the moment.

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

    Thanks, this was really clear. Super helpful!

    • @KetraGames
      @KetraGames  3 ปีที่แล้ว

      Great to hear this 😊

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

    This is incredibly helpful!

    • @KetraGames
      @KetraGames  2 ปีที่แล้ว

      Excellent, thank you 😊

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

    Great tutorial, but I was wondering how to make walking animation default for walk. While running animation when shift is pressed.

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

      Hi, you could just swap the statement so that it halves the speed if the button is not pressed. So something like this
      if (Input.GetKey(KeyCode.LeftShift) == false && Input.GetKey(KeyCode.RightShift) == false)
      {
      inputMagnitude /= 2;
      }
      Hope that helps 😊

    • @t2pol904
      @t2pol904 2 ปีที่แล้ว

      @@KetraGames Very helpful. Thank you!

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

    was worth my time...

  • @meenjashorts187
    @meenjashorts187 3 ปีที่แล้ว +5

    Hi, i need your help please : Parameter 'IsMoving' does not exist.
    UnityEngine.Animator:SetBool (string,bool) ( i use the script on the description and i have this issues)

    • @KetraGames
      @KetraGames  3 ปีที่แล้ว +3

      Hi, this is an animator parameter that was used in a previous tutorial that was used to switch between idle and running. As we are now using a blend tree this is no longer needed. It shouldn't cause any issues other than showing a warning though. The script on the description has now been updated to remove the reference to this parameter. Let us know if you're still having any issues

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

      @@KetraGames Checking if this should also be removed from the script linked in description:
      else
      {
      animator.SetBool("IsMoving", false);
      }

  • @victorfiy9844
    @victorfiy9844 2 ปีที่แล้ว

    Thank you soooooo much god bless you. just watched a single toturial and that is it now aim proooooo

    • @KetraGames
      @KetraGames  2 ปีที่แล้ว

      Glad it was useful 😊

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

    hi, i noticed that it resulted a different flow of the animation for controller and keyboard
    its fine for joystick but if use keyboard, it will run at default key and will walk if you press shift. hope you can help me with this, thank you !

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

    Hello, I like your video tutorial. if you don't mind how do I want to make it run while hold shift? Thank You

  • @Fmcslsl
    @Fmcslsl 3 ปีที่แล้ว

    Thank you.İt was amazing.

    • @KetraGames
      @KetraGames  3 ปีที่แล้ว

      Great to hear 😊

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

    Nice

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

    (I love her voice)

  • @lousadascp3208
    @lousadascp3208 2 ปีที่แล้ว

    Hello, what should I do if the animations just doesn't loop correctly? I have a blend tree for a walking animation and then a running animation, but when he's running at some point, when the animation ends and does the loop, the character just goes to the beggining of the animation (while the speed is still the same), and it doesnt keep on running as he should be. Do you know what the issue might be?

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

      Hi, did you manage to sort this out? Have you ticked the checkbox to have the animation loop?

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

    Hi i love your videos I have two questions
    1. In my visual studio the "screwdriver does not have the option to introduce local for Mathf.Clamp01(movementDirection.magnitude).
    2. The colorsceme on my code in visual studio is different from yours is there a setting for c# or unity that can fix this in visual studio.
    Thanks alot for all the great videos

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

      Hi, sorry I'm not sure why the screwdriver isn't working. Have you selected the text "movementDirection.magnitude" before clicking it?
      You can change the theme for Visual Studio to Dark by following these instructions - learn.microsoft.com/en-us/visualstudio/ide/quickstart-personalize-the-ide?view=vs-2022
      Hope that helps 😊

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

      @@KetraGames Thank you so mush for taking the time to answer.

  • @delcien9697
    @delcien9697 2 ปีที่แล้ว

    i dont know what ive done, but my Doozy walks and runs in the T shape and theres no animation at all :(, its complaining with this error : Animator is not playing an AnimatorController
    UnityEngine.Animator:SetBool (string,bool)
    PlayerMovement:Update () (at Assets/PlayerMovement.cs:87),
    line 87 is this one: animator.SetBool("isMoving", false);

    • @delcien9697
      @delcien9697 2 ปีที่แล้ว

      update1&2: i forgot to drag Doozys animation controller to the doozy property, now i have a new error complaining about the 'isMoving' is not declared anywhere, I think tis was declared in the old Doozy Animation controller thing which gets deleted here: 0:58.
      Update2: I fixed the error by adding a new bollean called 'ismoving' to the new animator ctr

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

      Glad you got it sorted. Yes, you're right. The reference to the IsMoving parameter was removed from the animator so should have been removed from the script to stop this warning being shown.

    • @delcien9697
      @delcien9697 2 ปีที่แล้ว

      @@KetraGames I was pretty pleased I was able to figure it out myself , it means something’s sunk in! Lol 😂

  • @Kingstedi
    @Kingstedi 2 ปีที่แล้ว

    I'll keep trying but I don't understand why the animations are not working anymore?, now the character is just sliding, even double checked the code if i'de missed anything but does not seem so

    • @KetraGames
      @KetraGames  2 ปีที่แล้ว

      Hi, it sounds like the parameter for the blend tree isn't being set so it is always at zero. If you have the animator window open while playing the game and have the character selected in the hierarchy, you should be able to see the parameters being set (or not) and hopefully diagnose the issue. Hope that helps 😊

    • @Kingstedi
      @Kingstedi 2 ปีที่แล้ว

      @@KetraGames yea I figured it yout already 😄 typo.. wrote "Input Magnitude" with a space when I had named it without spaces in Unity 🤦‍♂️

    • @KetraGames
      @KetraGames  2 ปีที่แล้ว

      Great, glad you worked it out 😊

  • @keyshaunthegoat8331
    @keyshaunthegoat8331 3 ปีที่แล้ว

    Where is the reference to the maximum speed variable?

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

      Hi, if you have a look here you can see the full script - dotnetfiddle.net/nakze4. Hope that helps 😊

    • @keyshaunthegoat8331
      @keyshaunthegoat8331 3 ปีที่แล้ว

      @@KetraGames thank you!

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

      Also i had got it working like 5 minutes after, great video!

  • @yassdv26
    @yassdv26 3 ปีที่แล้ว

    How to create rogdoll and respawn ?

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

      Hi, these are topics that are definitely on the list for future videos.

  • @flitz5604
    @flitz5604 2 ปีที่แล้ว

    hey, i dont really know whats up, but when i switch through the animations the speed doesnt change ?? did i miss something in the script or what could my problem be? eg. my running speed is the same as my walking speed.

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

      Hi, could you check the name of the Input Magnitude parameter in the script matches the name in the animator? It may be that one has a space and one doesn't. i.e. "InputMagnitude" vs "Input Magnitude".

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

    The game will be 3D, but the character will only move left and right (jump). How should I set the blend tree for this? or how to do it.

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

      Hi, you can still use the blend tree as shown in this video. You would then need to restrict the movement so that it only moves on the X and Y axis

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

    Make a video on mecanim

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

    You sound like Penny from Lost

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

    App name
    App name
    App name
    App name
    App name
    App name
    App name
    App name
    App name
    App name

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

    My console just kept saying this error:
    BlendTreeWorkspace is NULL
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

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

    What is this?
    Parameter 'IsMoving' does not exist.
    UnityEngine.Animator:SetBool (string,bool)
    PlayerMovementFour:Update () (at Assets/Scenes/Scripting/PlayerMovementFour.cs:88)
    Parameter 'IsMoving' does not exist.
    UnityEngine.Animator:SetBool (string,bool)
    PlayerMovementFour:Update () (at Assets/Scenes/Scripting/PlayerMovementFour.cs:95)

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

      Hi, apologies. I think this is a continuity error between this and a previous video. Try checking the spelling of the parameter in the animator window. It may be that there is a space in the parameter name 'Is Moving'. The two names need to match for it to work, so either change it in the script or rename the parameter. Hope that helps 😊