2D Animation in Unity (Tutorial)

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

ความคิดเห็น • 3K

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

    oh boy, if it took brackeys 20 minutes, im gonna be here till tomorrow

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

      SAAAMEE

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

      Good one

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

      no brackeys can do it in 5 minutes but he explains while showing you stuff to do

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

      what 1 day? wow thats fast i am here for a month

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

      Same

  • @CarboAter
    @CarboAter ปีที่แล้ว +32

    My man left TH-cam years ago, still the best tutor out there. Thanks for all you have done Brackeys:)

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

      Hello I'm good :)🤨🤨🤨

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

    If you need to press space 2 times to play the animation,
    You need to go in the CharacterController2D script and change on the line 130 the false to true.
    Hope this Helped!

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

      Thanks :)

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

      Thank you very much :D

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

      Tx

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

      (130)

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

      Nailed it, however it is line 130.
      m_Grounded = true; // note: this was false when downloaded from Brackeys.

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

    GUYS! If you're jump animation isn't working:
    (starting for a split second before you leave the ground)
    you don't need to add any ridiculous code. you don't need to modify the character controller. All you need to do is go to both of the exit transitions from the jump animation and turn ON the "Has Exit Time" parameter.

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

      (and also make sure your ground check is outside of your bottom collider)

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

      thanks this really saved me from insanity xd

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

      however you do have to set the jump animation to exactly the time you spend jumping otherwise you either end the animation in mid air and it looks really weird if you make it to short and if you make it too long then you end up on the floor looking like your falling
      anyone got a workaround?

    • @FionaAnimatesBagels
      @FionaAnimatesBagels 4 ปีที่แล้ว

      @@harshitpal4996 do you have it set to play in the animator controller and have the animation triggered by script like in the video?

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

      Thanks!! you saved me :)

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

    once again brackeys has the simplest and most effective solution - we miss you boss!

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

      hey man youre like the most recent comment on here and im having trouble with the events component under the character controller script, i cant find a solution to it and a i was wondering if you knew

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

      Yea true

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

      most effective - kill me

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

      @@jood7449 if i were you id join the discord if you haven’t. Theres a bunch of smart ppl that will help.

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

      its a nice tutorial, but using physics for 2d collisions is not efficient, physics is very expensive...you should use tiled based collisions instead...

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

    I would be lost without Brackeys, thank you for everything you have done

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

      If you would only have known

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

      @@Officergizmo lol

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

      Please tell me how you add character controler

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

      @@magiclessbrat8501 its complicated

  • @somieuler-ajayi5246
    @somieuler-ajayi5246 2 ปีที่แล้ว +329

    Problem:
    If you can't find the sample rate select the three buttons in the top right corner of the animation tab and select show sample rate

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

    For those who had an error where Idle and Crouch animation are playing at the same time, when you click the player, at the top of the inspector you should see where it is written "Layer". By default the Layer is set to Default, so what you should do is add a new Layer called "player", set the player's layer to that new layer, and finally uncheck the layer at the "what is ground" in the character controller.

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

      Thanks a lot, you rescued me

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

      Thank you for the tip, but mine still seems to be trying to activate both without pressing anything...

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

      i don't know if you still alive but you saved me after hour of suffering

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

      when i click on "what is ground" they dont show me uncheck option how i uncheck player layer?

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

      what a champ

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

    The best fucking tutorials on the fucking internet. You deserve a reward man. Fucking hell man I do not know where I would be without this channel.

  • @jarvis911
    @jarvis911 6 ปีที่แล้ว +18

    I just started getting into C# and game making in Unity again after hitting a brick wall and quitting a couple of years ago but your videos are really helping me grasp C# and Unity much more than I did before, thanks man I appreciate it!

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

    Animations Sample doesnt exist for me :/
    Edit: I found If you click on the 3 dots on the right of the animation tab you can select "Show Sample rate"

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

      thank you so much couldn't figure it out

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

      @@Tortuex_ How did you do it ? I can't seem to find it, the three dots only propose to close tab or add another for me

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

      @@florentbacale3280 it's the three dots right under those, it needs to be on the animation panel and not the "global" panel :) try and find three dots below the ones you found ;)

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

      Thank you so much, this really helped!

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

      Thanks a lot! I couldnt find it either, but your comment helped :)

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

    If anyone is having trouble with the jump animation, check that your ground's layer is set to "ground". Mine was in "default" layer and as soon I changed it to ground everything started working.
    Do what Dante says too: "find the ground radius variable [in character controller 2d script] and change it to a lower number like .05"
    Hope this helps

    • @totallyrandompersob1664
      @totallyrandompersob1664 4 ปีที่แล้ว

      If the jumping animation doesn't work still, maybe try keeping on exit time for when it switches to idle or running. Don't keep Transition time. Only keep it for when it goes from Any State->Jumping. Turn off exit time too on Any State->Jumping. I hope it helps because it worked for me. Not the perfect solution, but it works. I know I'm coping and pasting on everything
      EDIT: don't do it it causes a weird glitch if you keep pressing the jump button in midair.

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

      my character more like a meatball (the free unity asset with that red ball like character) and the slopes was not triggering the grounded bool in character controller. Normal terrain was fine even without any layering. Adding layer didn't worked so I went ahead and edit the character controller to add a second ground check and placed it both to each edges of the character and it worked wonderfully.

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

      I couldn't figure out the first one, but the ground radius variable worked!

  • @licensetothrill
    @licensetothrill 5 ปีที่แล้ว +7

    In case he doesn't mention it in the video, there's a reason that sprite sheets and atlases were developed and are still used in games today. They greatly save on memory and runtime because only a single instance of the sprite array image is loaded into memory at once, and all draws simply render a specific sub-section of the same file pointer in memory.
    In Unity, you can see this in action with the batching stats. This is an important concept in any engine, however. Including ones like Unreal or Love2D or Godot or Lumberyard. It's an important concept regardless of the engine, language or technology.

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

    Thy master shall be remembered
    thanks for the experience brackeys
    4 months of you gone is like a decade to me

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

    For those struggling with jumping animation playing for only one frame:
    1. Go to somewhere around Line 127
    2. Change "m_Grounded = false" to "m_Grounded = true"
    If you're having trouble finding this line, it should be after the following if statement:
    "if (m_Grounded && Jump)"

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

      Bro, TYSM you saved my life

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

      Thank you so much!

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

      Thanks mate, this is what i was looking for

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

      THANK YOU. U R A LEGEND 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

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

      And you also need to check off (can transition to self ) on the transition from anyState

  • @vasil-yt
    @vasil-yt 6 ปีที่แล้ว +497

    Skeletal animation would be so helpful and it looks quicker too

    • @NotBanned_
      @NotBanned_ 6 ปีที่แล้ว +51

      It is less quality, of course.

    • @crob3545
      @crob3545 6 ปีที่แล้ว +5

      Not Enough Horror. It seems it would be good for a 2D physics based fighting game like the one Im gunna try make

    • @Issung123
      @Issung123 6 ปีที่แล้ว +27

      Both have their pros and cons, you cannot get a pixel style like in this video with skeletal animation

    • @Mrabet_Houssem
      @Mrabet_Houssem 6 ปีที่แล้ว +5

      actually you can , look for Dead Cells

    • @cocobos
      @cocobos 6 ปีที่แล้ว +6

      sprite swap is the best for pixelarts though.

  • @danybeam
    @danybeam 5 ปีที่แล้ว +9

    IDK if anyone will see this comment
    But if your OnLanding is being called too soon and you don't want to change your jump force for whatever reason, try moving your ground check a little more to the center and actually a little higher than you would expect to be the "right" Y position.
    I set mine a little higher than what seemed correct (was right on the feet moved somewhere at shin level) and it worked perfectly

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

    In my game the "Crouch" animation made me hover, so I edited the Character Controller a lil so it removes 2 colliders. Now it's Smooooth.
    Loved the vid, long time coder, first time unity user.
    Definitely a thumbs up!

  • @th3-wolf130
    @th3-wolf130 5 ปีที่แล้ว +4

    I love these tutorials, they are the only reason i know how to do remotely anything in UNITY

  • @zonevaldez9716
    @zonevaldez9716 5 ปีที่แล้ว +76

    please help me! Why i need to double press the UP/W key to see the animation of jumping?

    • @sheadex4786
      @sheadex4786 5 ปีที่แล้ว +6

      Same for me :(

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

      me to

    • @ethanevans2402
      @ethanevans2402 5 ปีที่แล้ว +20

      I think it has something to do with his character controller script. If you look at the FixedUpdate function in his character controller he invokes the on land event whenever the character’s ground check intersects the ground and when the character was falling before that.
      The problem is that when your character jumps there is a split second where after you’ve jumped, the character’s ground check is still touching the ground, which means the character controller thinks you were just falling and just landed.
      This is why you can see the animation for a split second before it goes back to idle. Once you’re up in the air and press it again the animation plays because the ground check is far enough away from the ground to not trigger the event.
      Working on a solution right now.

    • @provensi
      @provensi 5 ปีที่แล้ว +8

      here guys
      private void OnCollisionEnter2D(Collision2D collision)
      {
      if (collision.collider.gameObject.layer == 9)
      {
      OnLandEvent.Invoke();
      }
      }
      delete where the another OnLandEvent.Invoke() is (FixedUpdate() i think), in my case the ground layer is 9, so change it if not yours

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

      Well, I did this and it's kind of working :))
      if (Input.GetButtonDown("Jump"))
      {
      jump = true;
      animator.SetBool("IsJumping", true);
      }else if (Input.GetButtonUp("Jump"))
      {
      jump = true;
      }

  • @Spartaton
    @Spartaton 6 ปีที่แล้ว +58

    I think covering skeletal animation is a great idea. Perhaps consider looking at the new skeletal 2D animation being integrated into Unity rather than or in addition to Anima 2D.

    • @jonatan01i
      @jonatan01i 5 ปีที่แล้ว

      @Bobby5z0 you bastard xd

  • @eziothegoat
    @eziothegoat 6 ปีที่แล้ว +265

    Please do game saving/loading tutorial!!

    • @AhmedKhalfYolo
      @AhmedKhalfYolo 6 ปีที่แล้ว +5

      Just use player prefs

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

      He made a video about saving and loading high score

    • @eziothegoat
      @eziothegoat 6 ปีที่แล้ว +6

      I mean about saving and loading if you exit the game and you want to continue playing later ..

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

      Yea same technique

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

      or you can use save game free (it is very helpful in my eyes)

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

    Incredibly easy and clear! Definitely you are the best tutorial channel about Unity!

  • @imconfused6955
    @imconfused6955 6 ปีที่แล้ว +169

    Your On Land event is checking too soon and that's causing my character to stop jumping immediately after leaving the ground. Any idea on why this is happening and how I can fix it?

    • @alizlatan4331
      @alizlatan4331 6 ปีที่แล้ว +6

      I'm Confused same

    • @teda-t6757
      @teda-t6757 6 ปีที่แล้ว +6

      Same here.. :/

    • @teda-t6757
      @teda-t6757 6 ปีที่แล้ว +17

      I have found a solution that works for me - it may be the same reason for you. I needed to increase the Jump Force and it worked fine. I think it's because when the force is too low, the play doesn't leave the ground quick enough before the On Land event is called to ground it.

    • @alizlatan4331
      @alizlatan4331 6 ปีที่แล้ว +6

      Ted Alden-Templeman it didnt work
      (And do you know why the idle animation & crouching animation play both at the same time)?

    • @d3athstalker
      @d3athstalker 6 ปีที่แล้ว +117

      Did you find an answer to this? The problem roots from the Character Controller 2D script but as of now I can't find a way to stop it from checking so fast
      EDIT: I actually just implemented something to delay this check from happening so quickly. This is the first thing that came to mind so it might not be the best option but you can download my edited script here : drive.google.com/file/d/1AMkNgVx0mRJHY9Jsiv_r5ifnYBuo7D94/view?usp=sharing
      I added a delay time variable which can be modified in the Unity Inspector under the Character Controller 2D script.
      If you use this script instead of the one supplied in the GIT repo it should work for you as well.

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

    i miss this channel

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

    All of your Unity tutorials are absolutely amazing, they've been helping me so much in learning game development! Keep up the great work!

  • @gmbalacera6086
    @gmbalacera6086 6 ปีที่แล้ว +9

    i love it, just recently bought the aseprite and im willing to make my own videogame, these videos are a lot of help! ♥

  • @alextashkov2772
    @alextashkov2772 5 ปีที่แล้ว +6

    Ok i know im late but for those of you reading this and having the bug with the jumping animation failing to transition to the idle or running animation - i think i found a fix
    (atleast it fixed mine)
    SO
    1 - find the line if(!wasGrounded) in the script that they provided and change it to if(!wasGrounded && m_Rigidbody2D.velocity.y

  • @ashurgeltv
    @ashurgeltv 4 ปีที่แล้ว

    SUPER AWESOME!!! I don't know why everyone is complaining. Everything in this video works fine and I'm making this game in 10/20 using the spaceman animation. All codes and everything else works fine. Honestly you just have to be patient and be able to problem solve. I feel people give up on themselves very easy. Trust me...I spent over 7 hours alone trying to get his crouch animation to work. i erased and rewrote the code...I went back and rewatched the video plenty of times...I am happy to say that yesterday i figured out the problems and I couldn't be more happier. It was a super easy fix which honestly pissed me off. As soon as i got it to all work. I saved the game and closed it. Thanks for everything and I plan to watch most of your vids.

  • @henryjohn6244
    @henryjohn6244 5 ปีที่แล้ว +6

    finally, after the error are occurrence. I can make animation for my character. Thank you so much Brackey.

  • @abdoudjam6846
    @abdoudjam6846 6 ปีที่แล้ว +1300

    Thanks a Lot ! yes Please skeletal animation would be so helpful ! ( Like if you agree ) !

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

      ?

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

      yeah,,..,. ?

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

      Sans

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

      Cristian the great toast because sans

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

      @Cristian the great toast he has to do with everything

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

    I don't have the 'Animation Folder' from 5:24. What do I do?

  • @leopoldo1586
    @leopoldo1586 6 ปีที่แล้ว +52

    I would LOVE a video on anima 2d

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

    FOR JUMPING, If you have an animation that is more than one frame long and animation is stuck on first frame do this
    Click on the transition from ANY STATE to JUMPING --->Untick 'Can Transition To'.
    this was causing an infinite loop allowing the animation to loop into restarting, staying in the first frame

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

      Thank you so much

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

    Adding all the animation took longer than making a menu and exporting the game xD Thanks though this is invaluable info in a very digestible format!!

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

    Thank you so much I actually made a dumb mistake of not finishing the video so I missed all the script parts and had a lot of trouble with it like for a day and then I went back and saw that we had to script and I was literally mindblown bruh. IT WAS SO BAD 😭😭😭 But luckily I finished the video this time and got my animations!!!! TYSM!!!!!

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

    im using my own script and was wondering if anyone knows how to add the events to my character controller

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

    the only tutorial that actuallly helped me even 2021

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

    For those of you who only see the Jump Animation for a split second this simple solution might work:
    *Solution:* Decrease the ground check radius and check if it works properly (if it still doesn't work decrease it even more). This also might not work if you have kept the game object that checks if touching ground too much below the player.
    *Explanation:* The reason why this is not working is that the program is checking for ground at that very split second of the jump since the program is updating too fast the animation check option keeps returning to false. If you decrease the radius of the ground check then by the time the program checks for ground the overlapping circle would have moved away from the ground due to low radius thus not overlapping anymore.
    *Don't add Exit time I know it works but the problem with that is it only works for fully flat ground, suppose you are jumping to a level higher than you then the sprite would be touching ground before the exit time is over thus remaining in jump animation for more time in spite of touching ground*

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

      Thank you, this helped a lot!

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

    The great thing is that you keep your *smile* _visible>true_ in all your videos...keep going!

  • @Demigodish4o3
    @Demigodish4o3 6 ปีที่แล้ว +23

    For some reason the idle transitions to crouching animation without me pressing anything.
    The "isCrouching" Parameter keeps going On and Off automatically :(

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

      I have the same problem.. Did you find a fix for it?

    • @oooriuken
      @oooriuken 6 ปีที่แล้ว +10

      Check if your player has the "Player" layer assigned

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

      Worked for me! Thank you :D

    • @oooriuken
      @oooriuken 6 ปีที่แล้ว +9

      Also the attribute “What Is Ground” of “Character Controller 2D” need to have everything selected except for that “Player” layer

    • @harperhejter7766
      @harperhejter7766 6 ปีที่แล้ว

      I have the same issue. Player is on a player layer , tilemap is on a default layer and "what is ground" have everything selected except for Player layer

  • @chrismeier3923
    @chrismeier3923 6 ปีที่แล้ว +20

    I am finding that all of my character movements and animations work perfectly, but the jump animation doesn't activate unless my character is already off the ground. I tried moving my ground check up a bit, but it just looks like the jump animation flickers and then stops. While I am in the air, if I hit the jump button again, the animation works. Any suggestions?

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

      @animeharmonics Thank You!!!

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

      Yo same

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

      @animeharmonics It didn't work for me

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

    Gotta make sure the animator is on the same object as the sprite renderer.
    And you can reveal samples by clicking the triple dot on the right of the animation window and hit "show sample rate"

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

      thank you so much

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

    For everyone that's struggling with an error where Idle and Crouch animation are playing at the same time to the Character Controller SCRIPT line 67 or 69 there is a ! before crouch. I struggled hours

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

      omfg thank you!

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

      Oh my gosh this literally saved my sanity!!! Thanks for the tip

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

      woahh thank you!

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

      I had the same problem and I tried to erase the ! at line 67 , but that made the player uncrouch when stop pressing the crouch button even if there is a ceiling. What I did to solve the problem was to add a new Layer(not sorting layer) called player, put the player in that layer and finally disabling the player layer in the "what is ground" in the character controller.

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

      thanks a lot you are a saviour!

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

    The problem - everything.
    The soloution -
    cry

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

      20 mins for Brackeys to do jumping animation.
      It took me 2 whole hours to solve all the problems.
      bool meCrying = true;

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

      And i have no idea how to play cutscenes.
      Cry==1
      If Cry == 1:
      Print("big sad')

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

      @@kacpercicharski4193 brackets also has a vid on that

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

      Brackeys**

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

      @@kacpercicharski4193 also the syntax in that is preeeetty wrong 😬

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

    If the jumping animation doesn't work still, maybe try keeping on exit time for when it switches to idle or running. Don't keep Transition time. Only keep it for when it goes from Any State->Jumping. Turn off exit time too on Any State->Jumping. I hope it helps because it worked for me. Not the perfect solution, but it works.
    EDIT: don't do it it causes a weird glitch if you keep pressing the jump button in midair.

  • @MCcoffa
    @MCcoffa 5 ปีที่แล้ว +14

    you.are.the.best... literally saving my school semester XD

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

    For those who are not seeing the samples option. Maximize the animation window and you should see 2 pairs of 3 dots in top right corner. Select the bottom most one and select show samples. I spent about an hour finding out how to do that one thing. SMH @ unity

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

      Thanks! I almost quit after I couldn't find it

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

      I love you so much

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

    one of my favourite videos!

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

    This is exactly the video I needed! I made different art pieces for animating in unity and wasn't sure how to go about it.

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

    Your tutorials are so helpful. I would love to see a skeletal animation one! Thanks for your hard work.

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

    omg!! thanks Bucky the ".anim" extension was missing in my case, thanks!!

  • @aprimic
    @aprimic 6 ปีที่แล้ว +97

    You never explained events in the character controller script

    • @Jason_fox
      @Jason_fox 5 ปีที่แล้ว +12

      Right? He just said he added some code like its not important but its missing for me.

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

      @@Jason_fox buckaroo he added it to the character controller script. He wasnt talking about the current script

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

      @@jerzyfice1426 I was using the script that came with all the other files. And the updated script that actually had events had to be downloaded directly

    • @vicenteferreira4348
      @vicenteferreira4348 4 ปีที่แล้ว

      @@Jason_fox ty dude i tought i had the most recent script (thumbs up)

    • @danyloborodchuk81
      @danyloborodchuk81 4 ปีที่แล้ว

      @@jerzyfice1426 Wait, what? Where can I find the new script?

  • @Xeratas
    @Xeratas 6 ปีที่แล้ว +25

    so there is a bug, when you jump and land and for some reason your movementspeed is exactly 0.1 he will stuck in the jump animation.

    • @Northernweird
      @Northernweird 6 ปีที่แล้ว

      Thank you so much. You sent me down the right road. I was having this exact problem but I had it set to greater than 0.01. Set it to Lesser no longer a problem. Cheers.

    • @pantheon4141
      @pantheon4141 6 ปีที่แล้ว

      Thanks a lot! you saved me a lot of trouble! \(*o*)/

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

      @@Northernweird Can u tell me how to do this?

    • @Northernweird
      @Northernweird 5 ปีที่แล้ว

      @@yuratwitch1093 I can and will. Give me 20 mins.

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

      @@yuratwitch1093 So I am going over this again as well. I lost my last build and I don't think this works as well with the newer version because I'm having difficulty with my player jumping without animation let alone with the animation. Basically though go to 5:10 he talks about how you can create two animations for the jump up and down. I think that may fix the problem however how you do that I'm not sure yet. Continuing with how Brackey is doing it. Go to 6:15 where he explains the animator than jump to 7:48 where he goes over parameters then to 1216 where he explains how to set up the transition of going to jump anytime. The time stamp 13:38 and I believe this is what I was talking about a month ago when it transitions back to the idle animation make sure jumping equals false and that the speed is less than 0.01. I hope this helps. Just curious to what version you are using. If you don't mind.

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

    on 16:00 I cant select a function. It gives me "No function" or "Mono Script". Does someone know what I missed?

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

    my jump animation plays for like 0.0001 seconds because it touches the ground when i jump how do i fix this?

  • @ahorseisahorseofcourse
    @ahorseisahorseofcourse 6 ปีที่แล้ว +5

    Thank you so much, this is saving me during my platform design final.

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

    Bro, I just watched carefully your tutorial and my game has +1 level, thank you :)

  • @evancarson5301
    @evancarson5301 6 ปีที่แล้ว +18

    I need learn more coding and this is a great vid

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

      he made a C# series. you should watch it

    • @meersindi3800
      @meersindi3800 4 ปีที่แล้ว

      jack you*

  • @jennajaillet6942
    @jennajaillet6942 6 ปีที่แล้ว +14

    So I noticed when my character jumps all is well, however when my character just walks off a ledge, the idle animation continues to play. Any thoughts on how to implement a fall into the code. (Sorry, I'm new at this but very excited to learn!)

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

      You could create a new animation strictly for falling then create a bool that turns on when falling and not jumping and then set the idle animation to transition to the fall animation when the bool is set to true

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

      @@ashtimbog whpa 8 hours ago

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

      @@someobscuremusicchannel lol 3 hours ago

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

      @@Liquid23 ee 14 minutes ago

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

      @@someobscuremusicchannel hddeuebhe 2 minutes ago

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

    Can someone help me? I've little problem with my jump animation, so when i jump the animation keeps reapets it self until i land on the floor. What should i do?

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

    help pls my character would not do the jump animation cz the "isJumping" gets activated and deactivated in a nanosecond

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

      Same

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

      @@yuforea i just added an exist time to the jump animation

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

      @@agustya4321 .

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

      @@yuforea so did it work fine? im glad i helped

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

      @@yuforea np

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

    I am unsure why but when I do this for my own sprites for my game when I press play in the animation window it does not change the sprites at all, does anybody know why this is happening or a way to fix this? If so that would be very helpful!

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

    I appreciate you for keeping your channels on view so that we can see other good channels for this too thank you 😭

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

    How did you make the event for landing check ??

  • @TheLastApplePie
    @TheLastApplePie 6 ปีที่แล้ว +11

    How do you add "Events" on a Script? i didn't use his Character Controller 2D script

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

      I'm assuming you've got this now but for anyone else struggling
      at the top put - using UnityEngine.Events;
      then an attribute that says this - [SerializeField] UnityEvent OnLandEvent;
      then where you want to trigger the event - OnLandEvent.Invoke();
      I managed to get the last 2 lines but i couldn't work out where i was going wrong for ages turns out you need to tell is to use the events thing at the top. That is really important aparently.

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

      @@Petesails thank you thank you THANK YOU

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

    Lifesaver! It takes me a lot to time to animate through code!

  • @thekiwisedge3498
    @thekiwisedge3498 5 ปีที่แล้ว +28

    When I have the Character Controller 2D script open the events show, and I can’t access them. What should I do?

    • @isroelchernetskey
      @isroelchernetskey 5 ปีที่แล้ว

      in this Prohect New Script

    • @nicholascarson2554
      @nicholascarson2554 4 ปีที่แล้ว

      You want to press the plus sign and then drag your player movement script inside of your event.

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

      how do i add events?

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

      i am having the same issue now

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

      but i cant see any events at all under the script

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

    does anyone know how to make a transition for when your character is turning? so if your character switches directions it doesnt just flip over it has an animation for it

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

      set its scale to -1,1,1 if input.getaxis is negative and when its positive set its scale to 1,1,1

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

    Guys when i crouch under something and release the button my character glitches
    any solutions?
    nvm i just lowered the ceiling check

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

    my player only does the jumping animation when i press space while doing the jump any help?

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

      hey, you managed to fix it?

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

      @@kxtoveenxHey thanks for interacting i managed to fix it somehow

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

      @@odgdhdlffb how?

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

      @@farukgozet2588 i dont even know

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

    I recently finded your Channel and your Tutorials are awesome! Thanks

  • @Natasha-rm5zi
    @Natasha-rm5zi 5 ปีที่แล้ว +5

    For jumping animation problem, open character controller script and find these lines at the end of the Move void:
    if (m_Grounded && jump)
    {
    // Add a vertical force to the player.
    m_Grounded = false;
    m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce));
    and then just delete m_Grounded = false;
    WIN!

    • @1zeldalegend
      @1zeldalegend 5 ปีที่แล้ว

      Thanks!

    • @filipmatic3749
      @filipmatic3749 5 ปีที่แล้ว

      Thanks!

    • @PeyCa
      @PeyCa 5 ปีที่แล้ว

      Nice one! Found a new bug though, haha.

    • @hiddnfox
      @hiddnfox 5 ปีที่แล้ว

      Yay! This one finally worked!

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

      Thx

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

    is there a way to reuse the same animations (walk, jump, etc) with other sprites automatically? (to change player skins without creating all the animations again)
    i found a way but it must be a better way....
    My way is hard to explain but is like this:
    - create an empty gameobject ("Player"?) with all the individual sprites in the same position x,y,z
    - use generic names for the sprites (frame1, frame2, frame3 or idle01, idle02, jump01)
    - in the animation you want to create (let's say: "Jump") you record and set the parameter Gameobject.isActive to false on all the sprites except the one you need to that keyframe (and repeat)
    - Done.
    If you want to create a different "Skin", just duplicate the previous gameobject ("Player")
    and change the sprites (using the inspector) without changing the names of the gameobjects containing the sprites.
    - All the animations and animator-controllers can be used with this new skin automatically!
    if you have 30 animations, you wont need to create 30 more for every skin, just duplicate the first skin and replace the sprites and you're ready!
    Note: i found there's another way (th-cam.com/video/HM17mAmLd7k/w-d-xo.html), replacing the 2D texture in the lateUpdate, the tutorial is from 2014 i haven't test it yet

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

      the way you told is pretty impressive, and considering a player wouldnt have more than 30 images, 30 gameobjects also does not put load on the cpu, and also, no gameobjects are created or destroyed, just enabled and disabled... Yeah so ur solution is pretty cool

    • @pritamdavis
      @pritamdavis 4 ปีที่แล้ว

      Cant think of a better way

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

      I just install Unity and learn C# for like 2 months. So I wonder will my guess be usable?
      instead of duplicating 30 animators, can we apply with code?
      like create a pool of library and call the sprite that we actually need for player.

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

      Use an animator override controller my dude. I use it to copy animation transitions without all the extra work because I can just drag and drop the animations and sprites I wanna use in and PRESTO!

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

    For anyone who can't move after adding animator.SetFloat, make sure to click the player sprite and then drag the animator component into the "Animator" section of the Player Controller component!

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

      Bro I was starting to panic when I couldn't figure out how to fix it. Thanks to you and all of the other helpful commenters I have been able to understand these small differences that drastically affect the game. Yee Yee.

  • @小夢-k9o
    @小夢-k9o 3 ปีที่แล้ว +5

    Hey guys I found something It might be work on jump animation
    Just take your 'ground check point' up a little higher then ground collider
    cause if too deep it will check for twice (sry for my bad english:(

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

    Great tutorial but I'm not sure why you'd skip the creation of the events. I get the point is to simply do the animations but I'm following the guide in my own character controller I made myself and now I'll have to research how to add events in. Not hard, but why skip over it, extra bonus content we could learn.

    • @LeHalazoone
      @LeHalazoone 4 ปีที่แล้ว

      Help please: what should i put inside the inspector for the player, about What is Ground, about Ground check, about Ceiling Check and Crouch Disable Collider????

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

      @@LeHalazoone did you follow the tutorial? If your not sure how to use the inspector with variables from a script yet sounds like you need to slow down and do more basic tutorials first.

    • @LeHalazoone
      @LeHalazoone 4 ปีที่แล้ว

      I have a problem with my scripts that are not reconized, i can not join it to the inspector

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

      @@LeHalazoone you don't join them to the inspector you put a script on a gameobject like the player object or simply a cube or even an empty gameobject then you can 'inspect' the script over on the inspector window. You should watch the unity tutorial roll the ball first. this is way to advanced for you atm. slow down and enjoy the learning phase of game dev, dont rush through it.

    • @LeHalazoone
      @LeHalazoone 4 ปีที่แล้ว

      @@MaximumSpice Thanks very much.
      I meant i drag and drop the script in the bottom of the object in the inspector. It is the same manipulation i think. I tried it many times and it works.
      But i do not understand why it does not in my case ?

  • @watagree
    @watagree 6 ปีที่แล้ว +7

    Hey i really like your content. I don’t know anything about coding and stuff. And I don’t watch your videos to learn but simply because I enjoy them. Game development is so intriguing and it looks really cool. I hope I get a change to actually learn from your videos when I finally get the time. ALSO ARE YOU GUYS FULL TIME TH-camRS OR ARE YOU AN INDIE STUDIO. I ask this because I would really like to see a fully fleshed out game of yours!!!!!!!

  • @Kazuhira64
    @Kazuhira64 5 ปีที่แล้ว +8

    After i have done everything with the crouch animation
    if i hold down the crouch button my animation is spazzing

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

      As Shirshajit Singha said there`s an error in the character controller script in the line 67/69 change "!crouch" with "crouch"

    • @guntherdanekes2746
      @guntherdanekes2746 4 ปีที่แล้ว

      @@TheNightteror Thx dude. Did save me some hours!

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

    To fix any weird crouching issue add the arrows that are coming from Any State, IsCrouching = false

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

    Problem:
    the idle animation doesn't switch to the walk animation even though i have the transition and i turned off has exit time

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

      I have the same problem

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

      Have you found the solution

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

      @@shaiz9860 no i just used another tutorial try GDtitans

  • @30may10
    @30may10 5 ปีที่แล้ว +4

    why my character just look at the direction of right? and pls i need help i used 2D Platform Controller from the asset store and is this made the way wrong?
    please i need answers

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

      Add this to your void Update() code-
      if (Input.GetAxis ("Horizontal") < 0)
      {
      Vector3 lTemp = transform.localScale;
      lTemp.x = -1;
      transform.localScale = lTemp;
      }
      if (Input.GetAxis ("Horizontal") > 0)
      {
      Vector3 lTemp = transform.localScale;
      lTemp.x = 1;
      transform.localScale = lTemp;
      }

  • @JC-rv2tq
    @JC-rv2tq 3 ปีที่แล้ว

    IDK if u are reading this but uve been helping a lot with my College work all year long THANKSS

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

    WHat should I do if I don't have OnLand Events field in CharacterControlled 2D script?

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

      yeah , i would like to know, too.
      because i used different movement script

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

      i dont know what to do and i even used his script and the events arent there

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

    If your jump animation keeps looping, go to your jump->idle transition and change the parameter to "Speed Less Than .01" :)

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

      Didn't work 😭

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

    Need Help my jump animation isnt working and i have spent hours looking whats wrong..... the animation ticks for a second and thats all

  • @PoppyTheDrapica
    @PoppyTheDrapica 5 ปีที่แล้ว +17

    I'm crying my character is walking and moving and ahsjdkgashjfgfj THANK YOU

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

    I'm having two problems:
    1) The "isCrouching" parameter is rapidly being activated without me pressing anything, causing my player animation to constantly spazz between idle and crouch, or idle and run when I'm moving
    2) I have to double tap my jump button for the jump animation to actually play
    Does anyone know how to fix this? I'm really stuck on it.

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

      Same Problem, don't know what to do

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

      I found it as a reply in the previous video:
      Dino Vidakovic
      2 years ago
      There is a bug in new version of the script for movement. On line (67), I guess they accidentally put !crouch instead of crouch. This bug makes your character be always in the crouch position. To fix the bug, just open the "Character Controller 2D" code and edit that little "!".

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

      @@prestonthorniley Thank you so much!

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

      @@prestonthorniley It doesnt work :(

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

      For the double tap jump animation
      the issue is in the CharacterController2D script. In the statement "if (m_Grounded && Jump)" it returns this: "m_Grounded = false"
      this should be changed to "m_Grounded = true"

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

    I should have found this video at the start of the weekend! Great job explaining transitions! It all makes sense to me now! And yes, skeletal animation would be interesting to learn!

  • @jannisben5870
    @jannisben5870 6 ปีที่แล้ว +19

    If your Jump animation is only showing up for a few milliseconds you have to put your Ground check a little Upwords.
    (This is the Problem I have had xD)

  • @Goldenaust1
    @Goldenaust1 5 ปีที่แล้ว +7

    This is super helpful, however I'm getting weird bugs like being stuck in the crouching animation or playing the run animation when it should play jump.
    I've gone over the video a few times to make sure I did everything exactly like you did. Hopefully it's not because I'm using a different version of Unity because I did notice some of the user controls were in different places and some of the tools looked a little different compared to your time of recording this.

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

      Im aware this isnt helpful, and i dont yet have the answer.
      ive got the exact same thing. really cant figure it out.

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

      Oh my god I'm not the only one.... My player 2 gets stuck in the crouch and crawl animations and I haven't figured out how or why.

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

      @@windwakin i had the same issue. try changing the ceiling radius number to something low like .1 or lower. I'm using really small pixel graphics so the scale of the checks need to be lowered a ton

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

      @@josiahhoward2783 Precisely what I needed! Thanks for the reply 😁👍

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

    Does anyone know why my character gets stuck on nothing? I have a box collider and circle colliders to smooth out the edges for my character's feet. I'll be walking and then it will get stuck, I can move backwards, but it is like there is an invisible barrier. When I jump over it, it goes away, and later an "invisible barrier" comes up in a different location.

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

      Yeah, I've already experienced what you are saying. So I think I can help you. You might as well remake the collider on your character if you choose the circle or capsule shape for one of your character. Be sure not to change the SCALE. You should adjust the size only by changing RADIUS and HEIGHT of that collider. That's it.

    • @amazingalexgaming5272
      @amazingalexgaming5272 4 ปีที่แล้ว

      I'll try it, thanks!

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

    When I jump it gets stuck in the jump animation until I restart the game

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

      i had the same problem, i had accidentally added an extra event and it showed an error and stopped, i removed the extra event and it worked

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

      I have the same issue plssss halp

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

    For some reason, my Crouching isn’t working. I’m on the animator and the IsCrouching parameter keeps spazzing out, turning on and off even when I’m not crouching anybody else experiencing this problem

    • @64-BitWarrior
      @64-BitWarrior 4 ปีที่แล้ว +1

      Yea same been working for hours straight on it

    • @kittycatcupcake1976
      @kittycatcupcake1976 4 ปีที่แล้ว

      Same thing happening to me!!!! Have you guys figured it out?

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

    HELP, when i try to place my sprites on the animation, it does´t let me do it. Does anyone know how to solve this?

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

    whos back to these classics in 2024

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

    So basically I'm dying here. My Ground check triggers the moment my character jumps and instantly cancels the animation. I followed this tutorial to animate my own sprite and also followed the previous tutorial on movement, so my code adds up to yours. Everything works fine except for the ground check on the instant that I jump. What can I possibly do to fix it? How can I make the ground check fire ONLY when I hit the ground after the jump?

    • @KAYMOofficial
      @KAYMOofficial 4 ปีที่แล้ว

      Same problem here. Anybody know why?

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

      @@KAYMOofficial Dante Quizás solved it here in the comments.
      Go to CharacterController2D.cs to the code:
      if (!wasGrounded)
      OnLandEvent.Invoke();
      and change it to
      if (!wasGrounded && m_Rigidbody2D.velocity.y < 0)
      OnLandEvent.Invoke();
      This will make sure you are falling before determine you are landing.
      It should solve the problem.

    • @hromska6955
      @hromska6955 4 ปีที่แล้ว

      @@yotamcohen9409 Dude thanks a lot u saved my life!!

    • @arkadeeppaul6512
      @arkadeeppaul6512 4 ปีที่แล้ว

      @@yotamcohen9409 Thanks a lot mate. !!

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

    Despite the fact that there are many game dev tutorials in skillshare, i still prefer brackeys LOL

  • @scrub4749
    @scrub4749 5 ปีที่แล้ว +10

    Hey, im having a problem where while jumping my animation switches from jumping to idle animation mid jump. I would set up some kind of velocity parameter but i dont know how

    • @theemeraldfalcon9184
      @theemeraldfalcon9184 5 ปีที่แล้ว

      it needs to loop i've checked mine but the animation doesn't loop do you know why?

  • @IvanLira
    @IvanLira 5 ปีที่แล้ว +6

    Hi everyone, first of all... amazing video, your work is absolutely great ! thank you very much.
    Now... can somebody help me? when I start the game and press the jump button (space) my character does jump but it doesn't display the jump animation right away, but instead, I have to press again the space button when my character is in middle-air to actually trigger the animation... does anyone knows why??

    • @mihauedits
      @mihauedits 5 ปีที่แล้ว

      the same thing happend to me an i dont know what to do either

    • @joaqstarr
      @joaqstarr 5 ปีที่แล้ว

      Your jump check is probably too low

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

      Hey
      Remove the ! from the !wasGrounded
      if (colliders[i].gameObject != gameObject)
      {
      m_Grounded = true;
      if (!wasGrounded)
      OnLandEvent.Invoke();
      }
      to
      if (colliders[i].gameObject != gameObject)
      {
      m_Grounded = true;
      if (wasGrounded)
      OnLandEvent.Invoke();
      }

    • @AozoraOrigami
      @AozoraOrigami 5 ปีที่แล้ว

      @@rushilgupta7987 this didnt help btw

    • @rushilgupta7987
      @rushilgupta7987 5 ปีที่แล้ว

      BlueBit it helped me in the old version