Unity 2D Platformer for Complete Beginners - #2 ANIMATION

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

КОМЕНТАРІ • 1,2 тис.

  • @PandemoniumGameDev
    @PandemoniumGameDev  4 роки тому +121

    Hey everyone, thanks for watching. This is my longest video with lots and lots of explanations, I'd like to know if this is what you want to see or you'd like me to do things quicker and explain less.
    ● Complete Code: pastebin.com/zLUWBa01
    ● Support the channel on Patreon or UA-cam: www.patreon.com/pandemonium_games
    ua-cam.com/channels/pkMj5b5kl2_YApDvgUCVQQ.htmljoin
    ● Subscribe to the Weekly Pandemonium Newsletter: www.pandemonium-games.com/#:~:text=About%20Me-,Weekly%20Pandemonium,-Subscribe%20to%20our

    • @petertohme8325
      @petertohme8325 3 роки тому +11

      Keep it like this

    • @red2go56
      @red2go56 3 роки тому +4

      its a nice video but the code dont work in my game
      I have the
      error CS1002

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +1

      @@red2go56 you see me playing in the video, right? Check the code again and if you still don't find it give me more details on the error.

    • @red2go56
      @red2go56 3 роки тому

      @@PandemoniumGameDev ok

    • @red2go56
      @red2go56 3 роки тому +3

      @@PandemoniumGameDev using UnityEngine;
      public class PlayerMovement : MonoBehaviour
      {
      [SerializeField] private float speed;
      [SerializeField] private float jumphight;
      private Rigidbody2D body;
      private Animator anim;
      private bool grounded;

      private void Awake()
      {
      //Grab references for Rigidbody and animator from object
      body = GetComponent();
      anim = GetComponent();
      }

      private void Update ()
      {
      float horizontalInput = Input.GetAxis("Horizontal");
      body.velocity = new Vector2(horizontalInput * speed, body.velocity.y);

      //Flip player when moving left-right
      if(horizontalInput> 0.01f)
      transform.localScale = new Vector3(5, 5, 1);
      else if(horizontalInput< -0.01f)
      transform.localScale = new Vector3(-5, 5, 1);

      if(Input.GetKey(KeyCode.Space) && grounded)
      Jump();

      //Set animator parameters
      anim.SetBool("grounded", grounded)
      }

      private void Jump()
      {
      body.velocity = new Vector2(body.velocity.x, jumphight);
      anim.SetTrigger("jump");
      grounded = false;
      }

      private void OnCollisionEnter2D(Collision2D collision)
      {
      if (collision.gameObject.tag == "Ground")
      grounded = true;
      }
      }
      this is my code

  • @TheCrabActivist4525
    @TheCrabActivist4525 3 роки тому +477

    My dude, don't ever apologize for explaining things, all it does is help us, keep up the great work!

    • @deaduser1532
      @deaduser1532 3 роки тому +13

      Yes it's the only way for us to learn!

    • @dodgerivadeneyra6997
      @dodgerivadeneyra6997 2 роки тому +2

      It helps so much knowing what get component does and stuff, thank you so much pls keep up the explanation it helps a lot

    • @joshmoore3785
      @joshmoore3785 2 роки тому +2

      true

    • @Pavme
      @Pavme Рік тому +2

      ikr! I hate it when I am just copying things I dont understand. Its like copying a chinese sentence when you understand nothing about it. anyone can copy even if they dont understand

    • @TheCrabActivist4525
      @TheCrabActivist4525 Рік тому

      @@Pavme Exactly

  • @BlazeLibra
    @BlazeLibra 2 роки тому +116

    Why is this 10x more informative than the actual lecture videos I get in my game design bachelors

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +11

      No idea, but I'm very glad to hear it😆

    • @twiston1337
      @twiston1337 2 роки тому +7

      @@PandemoniumGameDev bro still reads comments over a year after the video is uploaded, legend!

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +9

      @@twiston1337 Doing my best😁

  • @CharlesA.
    @CharlesA. 10 місяців тому +5

    bro this is legit better than some courses on Udemy. you're a great teacher, you actually take time to explain instead of rushing things and that makes a big difference. 5 stars.

  • @subharanjanghoshal5597
    @subharanjanghoshal5597 3 роки тому +96

    OMG! This is the most ideal Unity 2D Platformer Tutorial for beginners. I'm saying this after trying a dozen of other tutorials.
    Keep the lessons coming please ❤

  • @braylongouge9103
    @braylongouge9103 2 роки тому +8

    You are amazing! I've always wanted to go into video game development, and other tutorials of unity acted like I already knew how it worked. Your flawless way of explaining things to people who have no idea how anything like unity works is keeping me motivated to learn more and go farther!

  • @freddyhouston9181
    @freddyhouston9181 2 роки тому +11

    This series is excellent, everything you might need for creating a game. and everything is applicable if you want to add your own characters and animations.
    10/10 perfect tutorial.

  • @celmnc
    @celmnc 2 роки тому +4

    Bro, your such a good teacher of this stuff! I've spent hours watching other people's tutorials and have got lost every time... I came across you, and I've actually retaining what you show us.... Thank you so much this is so amazing

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +1

      I'm very glad I could help, good luck on your game dev journey!

  • @tucnacek8694
    @tucnacek8694 2 роки тому +2

    This is seriously the best tutorial series on unity that I have ever watched.

  • @theaidanmann
    @theaidanmann 3 роки тому +15

    Finally! A tutorial series I can understand. You’ve helped me to actually understand what the code I’m writing actually does instead of just basically copying and pasting it

  • @M3lank0llk
    @M3lank0llk 3 роки тому +3

    Bro, i am so thankful that i found your video. It took me about an hour to solve the "grounded" issues cause I name my bool with a uppercase "G" instead of lowercase "g" and it won't stop the jumping animation but I figured it out. Thanks for the tutorial. You're legend my guy!

    • @rararrar98553047658
      @rararrar98553047658 8 місяців тому +2

      I was legitimately just having this issue, thank you so much for commenting! You've saved me a headache.

  • @juniorcollado4904
    @juniorcollado4904 3 роки тому +57

    I love this series and it really helps me out! Although, it would be cool if we got a video on how to make our own characters as well

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +29

      I'm bad at art :D there are tons of pixel art channels on UA-cam, try to follow their process then create the same animations that we use here and it's gonna work perfectly.

  • @mthaler108
    @mthaler108 2 роки тому +8

    ahh thank you so much for your tutorials! dont worry about explaining too much it is very helpful! I already know how to write in c# but this is the first time i'm making a game (and using unity for that matter) so finding a video that explains everything step by step is perfect!

  • @A1Qicks
    @A1Qicks 2 роки тому +1

    Man, your tutorials are my favourite. Really speed launched me into making things. I took a detour into other tutorials to learn other stuff but keep coming back here for the basics.

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +1

      Thanks a lot, love to hear that! Good luck on your game dev journey!

  • @Jono1982
    @Jono1982 3 роки тому +8

    In Animation tab you can click the three vertical dots and enable Samples then change the 60 to 12 and it'll space the frames out accordingly. Also it has to be lowercase names for Parameters in the Animator. Great tutorial though I am learning a lot. :D

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +2

      Glad you're learning and enjoying it, love to hear that.
      - Changing the samples from 60 to 12 will make the animation 5 time slower. You can space the frames yourself manually.
      - The parameters for the animator can be both in lower case and uppercase, the point is that they should be matching both in the animator and in the code, otherwise they won't work.

    • @nanorbogin896
      @nanorbogin896 2 роки тому

      thanks for mentioning the lowercase names, I couldn't figure out why my transition wasn't working but it was because I had capitalized the run parameter but not in the transition.

  • @erglwrgl
    @erglwrgl 2 роки тому +2

    This series is actually making me feel like I'm learning stuff.

  • @mildbeandip
    @mildbeandip 2 роки тому +21

    I doubt anyone will see this. But I was having an issue with the jump animation repeating even though I had turned off the loop animation ability. I had to click on the transition arrow and check off the transition to self option and that stopped the Jump state from repeating. I am using Unity 2021.3.11f1. Anyway have a nice day everyone and good luck on your game dev and coding journey, may it be a good one.

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +5

      Someone will see it for sure :D That's a great tip actually I think I forgot to do that too, so thanks a lot!

    • @meowzzz10
      @meowzzz10 Рік тому

      ello, I doubt you will see this but I am having the same problem as you, the jump animation keeps on repeating when I test play it, I am new to unity so i do not really understand what you are saying, I am using version 2020.3.48.f1
      nevermind, I fixed it by switching true/false on the transition arrows from any state > jump and jump > idle, but now I have another problem, I cannot jump

    • @gargisharmaa
      @gargisharmaa Рік тому

      @@meowzzz10 My character is also not able to jump, did you fix the issue? If yes how?

    • @meowzzz10
      @meowzzz10 Рік тому

      @@gargisharmaa I watched the video again and I forgot to add a tag on my ground object 19:20. Just make a tag called ground and add it on your ground object or what object you want your character to be able to jump on, Thats how I fixed it because I was not paying attention at the end. Hope this helped.

    • @fatallegend1
      @fatallegend1 Рік тому

      I was having this exact same issue and your comment helped me fix it! Thank you so much!

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

    even better cant describe how good these tutorials are

  • @mikehynz
    @mikehynz 3 роки тому +7

    I REALLY like when you take the time to explain in detail what the code is doing. I am taking my time with this to understand every step. I like that it's not just "do this then that" instruction. You are telling us 'why' and that is valuable.

    • @markrigz
      @markrigz 3 роки тому

      I want to second this. The more you explain, the better!

  • @harley_randelo
    @harley_randelo 2 роки тому +1

    I'm so glad I found your channel! that was more informative and educating than a brackeys video or a 6 hour college lecture. thanks so much for posting. you are the best unity creator on this platform!

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +1

      Huge thanks for this! Hope you like the rest of the series as well, good luck!

  • @LagoonLofi
    @LagoonLofi 2 роки тому +9

    If anyone is having an issue where their jump isnt working, or stuck in jump animation, my error was OnCollisionEnter2D the On was lowercase (on) instead of On. It doesnt give any error or anything it just does nothing when space is pressed. I had auto complete on too. hope this helps :)

    • @ЛюбовьОрлова-р8д
      @ЛюбовьОрлова-р8д 2 роки тому +2

      the same trouble, when i pick play hero is standing in jump position(he doesnt run). Cant to resolve this problem

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

      My On is uppercase and the character is still stuck in the jump animation and I don’t know how to resolve the issue :(

  • @GTAclips22
    @GTAclips22 4 місяці тому

    This is my Second Unity roject EVER and this course is really helping me learn the basics. I started with Marks Flappy Bird Tutorial and got to grips and this is now really helping me! Thank you so much for making this free and not on Udemy:)

  • @ThatMellon
    @ThatMellon 3 роки тому +11

    I'm liking this video series so far. I think the way you've structured this tutorial is great!
    Personally I'm not so interested in animations at the moment, I think they serve their place in the video tutorial though (I'll be doing back through this tutorials to add in animation at a later state); because of the chapters you've put in the videos I could easily find the part where you talk about the "grounded" collision for the jumping code (which is where the juicy stuff lies for me!). I'm a beginner to using Unity and C# but I've dabbled in very similar tutorials for GameMakerStudio2 and GML. The logic has a similar flow (with a few extra steps in units UI and vectors) but I'm understanding it well enough to see how they work and why.
    Thanks again!!

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +1

      Thanks a lot! Make sure to implement the rest of the code though, we did fix the jumping in this video as well and other stuff not related to animation.

  • @memosickduck9230
    @memosickduck9230 2 роки тому

    I never wrote any notes gamedev tuts except this one. Thank you so much

  • @michrain5872
    @michrain5872 3 роки тому +9

    Yay! I feel like I just leveled up (to lvl2 lol)
    Also, I wanted to have a jump speed independent from the walk speed and I got around it just by paying attention and applying what's discussed here! Off to the next step :3

    • @mrglass9656
      @mrglass9656 2 роки тому +1

      I think that you add that by changing the speed variable in terms of hight

    • @mrglass9656
      @mrglass9656 2 роки тому

      But it also changes the speed as well

  • @hakoroni9735
    @hakoroni9735 Рік тому

    Thanks for breaking my game, Pandemonium! I really appreciate it!

    • @ECAKJ
      @ECAKJ Рік тому +1

      first time ever in unity and it worked perfectly for me. i think you broke your own game

  • @tyrussell3516
    @tyrussell3516 4 роки тому +5

    YESSS i’ve been waiting all week for this i’ll definitely work on this later tonight thank you so much!! keep up the good work

  • @r3dh00d6
    @r3dh00d6 Рік тому

    Man, I just started trying to understand unity and making games and ur long explainations are really helpful. I didn t watch any of ur new vids, but I sure hope you still take time to explain all the small steps, because for begginers it is the only thing that makes things clearer.
    Your tutorials are amazing and I thank you very much for uploading them :)

  • @tyrussell3516
    @tyrussell3516 4 роки тому +3

    this is so cool to see working thanks so much and have a great day!

  • @ozanyasindogan
    @ozanyasindogan 2 роки тому

    first Unity tutorial I watched so far till 4am and which makes me understand everything, well done and thank you!

  • @wiguofficial
    @wiguofficial 3 роки тому +5

    So helpful, I never knew where to start and this gave me somewhere to start, keep up the amazing work.

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

    best turorial out there for beginners like me who does not have any prior knowledge of c# and wanna make a simple game as they are learning what each script does.
    bravo👏👏

  • @AbdulQadir-bk6bx
    @AbdulQadir-bk6bx 2 роки тому +3

    Guys I need help!
    After adding the animation code, my player no longer jumps or moves, a liitle help?

  • @U4IA1183
    @U4IA1183 2 роки тому

    so far I watched unity's course, watched toooo many tutorials on youtube and wasted time , went to reddit and even Stack Overflow TRUST me you are the only one who can EXPLAIN CODE for us to UNDERSTAND.

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      Thanks a lot! Love to hear that it's clear enough to understand, that was my goal. Hopefully the entire series is like that.

  • @zachmin9296
    @zachmin9296 2 роки тому +7

    My character is constantly stuck in the jumping animation no matter if he is runnin or idle he stays jumping , does any1 know where I went wrong?

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

      I have the same problem

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

      Fixed it already, just forgot to write some code.

  • @delcien9697
    @delcien9697 2 роки тому +2

    Absolutely brilliant videos, my little old brain loves ur bite size videos and im not confused after watching them.. u explain this stuff so well.. subscribed! :)

  • @aadityagupta2687
    @aadityagupta2687 3 роки тому +6

    Hi, just amazing work.
    Currently, I am having a problem that the "grounded" variable is not taking true value even after collision. I believe the collision function is not working. Please give me some suggestions to overcome this issue. Thnx

    • @weiralcz
      @weiralcz 3 роки тому +2

      Hello, do you set the Ground object tag to "Ground" ? To do this simply click on the ground object and on the "inspector" panel on the right, set tag below the Name "Ground", hope it will work, mate. ;)

    • @6ileys
      @6ileys 3 роки тому

      @@weiralcz Having the same problem, I set the tag already but the collision isnt detecting.

    • @weiralcz
      @weiralcz 3 роки тому

      @@6ileys Send me your player controller script, please.

    • @6ileys
      @6ileys 3 роки тому

      @@weiralcz I ended up getting to work, Ian’s a sprays in front of ground in the tag lol

    • @weiralcz
      @weiralcz 3 роки тому

      @@6ileys ooh, i didnt even think about that. keep it going. :)

  • @robbylemmens9734
    @robbylemmens9734 2 роки тому

    This is by far the best tutorial to be found here on UA-cam, kudo's sir!

  • @gameprogramming6550
    @gameprogramming6550 3 роки тому +20

    To keep values same for my new custom character to 0.5 I did this:
    if (horizontalinput > 0.01f)
    {
    transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
    }
    else if (horizontalinput < -0.01f)
    {
    transform.localScale =new Vector3(-0.5f,0.5f,0.5f);
    }

    • @eemelivastamaki8005
      @eemelivastamaki8005 3 роки тому +2

      I did have a problem with my character being too big and that works, so thx.

    • @deaduser1532
      @deaduser1532 3 роки тому +3

      I did if (horizontalInput > 0.01f)
      transform.localScale = new Vector3(2, 2, 1);
      else if (horizontalInput < -0.01f)
      transform.localScale = new Vector3(-2, 2, 1);

      if (Input.GetKey(KeyCode.Space))
      body.velocity = new Vector2(body.velocity.x, speed);

    • @ghhn4505
      @ghhn4505 3 роки тому +1

      Thanks man, huge help. I couldn't get the scale values to work for mine until I found this.

    • @drunkengaming4782
      @drunkengaming4782 3 роки тому

      Mines a bit more complicated, it's 0.1532664 (I need this size, can't change it lol) but -0.1532664 doesn't work :P

    • @Dave-pd8rv
      @Dave-pd8rv 3 роки тому +2

      it doesn't work for me :(

  • @Krancis133
    @Krancis133 2 роки тому +1

    This is amazing. Thanks for explaining the Unity actions for C#, helps a lot in understanding what must be done to get the code right.

  • @thedelidumrul5599
    @thedelidumrul5599 10 місяців тому

    Thanks for the video bro. I began to make my own game before one month ago. I was having issue with jump animation, but with your video I found where I need to fix 👍 after 3 years it helped me :)

  • @revialle5434
    @revialle5434 2 роки тому

    I've only made a Tic Tac Toe game in C before. But, this is my first ever proper Indie game with custom made sprites and animations and I have to say, thank you so much! All of it works real butter smooth.

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      Pleasure hearing this, hope you get to make a lot of cool games in the future!

    • @revialle5434
      @revialle5434 2 роки тому

      @@PandemoniumGameDev Yes sir, will do!

  • @yourlocalmadjack8374
    @yourlocalmadjack8374 2 роки тому +2

    5:00
    Just making a note for myself

  • @vailsh
    @vailsh 3 роки тому +1

    so underrated man, keep up the great work!

  • @harryfriend4362
    @harryfriend4362 3 роки тому +1

    thank you iv blasted through the videos and now Im lost without it haha. make it really easy to follow and understand

  • @אליהאמיגא
    @אליהאמיגא Рік тому

    even two years later, still my favorite explanation

  • @madara_u_chiha
    @madara_u_chiha 8 місяців тому

    Most perfect tutorial about 2d games ever!

  • @animat0r_sk957
    @animat0r_sk957 2 роки тому +1

    Video starts: you need to upload sprite from unity assets
    Me: draw my own character and draw animations :D btw good video i was watching after year and it's still helpful

  • @Lilcuh2011
    @Lilcuh2011 2 роки тому +1

    Man you deserve way more than 10k subs

  • @marharols5793
    @marharols5793 2 роки тому +1

    At 18:17 you open some kind of autocomplete function? How can i use this?

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      Check point 1 in the pinned comment on episode 1. Or just go to this video: ua-cam.com/video/g3sHbFmzq3I/v-deo.html&ab_channel=qubodupDev

    • @marharols5793
      @marharols5793 2 роки тому

      @@PandemoniumGameDev Found out i just had installed the wrong version of visual studio code, didnt even have the tools section. Downloaded the 2022 version and its good now. Great tutorial, well explained!

  • @BonkerzGamer119
    @BonkerzGamer119 7 місяців тому

    for anyone struggling just double check the ground Ground and Grounded are the same, it starts to blur when your typing along and can break things. once i fixed that all worked perfectly fine.

  • @SarahPlaysVideoGames
    @SarahPlaysVideoGames Рік тому +2

    I think it's incredible that not only did you make a tutorial that explains everything and is easy to understand even with minimal prior programming knowledge, but you're still responding to people in the comments about it!
    I do have one question myself: I plan to have both walking and running in my game. Right now, run is set to Z (although I'm probably going to change that later down the line.) If I wanted a different animation to play while running, how would I adjust the argument to check for if the run key is being held down, so I have the run animation for running and the walk animation for walking?

    • @PandemoniumGameDev
      @PandemoniumGameDev  Рік тому +1

      Thanks a lot for the praise!
      I think in this case you can try something like this:
      //Set animator parameters
      if (horizontalInput == 0)
      {
      anim.SetBool("run", false);
      anim.SetBool("walk", false);
      }
      else
      {
      if (Input.GetKey(KeyCode.Z))
      anim.SetBool("run", true);
      else
      anim.SetBool("walk", true);
      }
      Obviously this needs to replace the current line 31 that manages the animator run bool. You will also need to create a new bool parameter called walk in the animator and a new walk animation that triggers when walk is true.

  • @krithikghosh
    @krithikghosh Рік тому +1

    You are the best teacher ❤I love your teaching skills and style😊 please don't apologise for explaining 🙏 it helps us a lot. You are the best and help me understand the programs and don't say me to just memorize it. This makes your videos stand out from the rest. Please remain like this. You are way underrated compares to your skill level. Don't lose hope because I know that one day you will surely reach a million subscribers ❤🙂🥰🤓👍

  • @PrintedToPerfect
    @PrintedToPerfect 2 роки тому

    Great video, all the other people just tell you to download a game, this actually helps you make it by yourself!

  • @Bizmark7
    @Bizmark7 2 роки тому

    Wish we could like these videos a million times.

  • @sb7675
    @sb7675 2 роки тому

    I love so simple explanation . Very fast and easy to learn your code. Thanks.

  • @zenco7936
    @zenco7936 Рік тому

    This has been incredibly helpful, thank you.

  • @alduin8877
    @alduin8877 2 роки тому

    I was chilling in on the moon waiting for you to get done with the sprite

  • @AleksanderSzturo
    @AleksanderSzturo Рік тому +1

    Hey, I got a problem. My hero doesn't go from Jump animation back to Idle. AFter the first fall it stays in last jump position and it doesn't change to idle or Run. The character only flip right left.

  • @kunodev
    @kunodev 2 роки тому

    First time ever i want to continue a full serie on how to make a game keep up the good work 😁😁😁

  • @topcat5233
    @topcat5233 9 місяців тому

    lol mine was drunk on the first playtest, fell over immediately with a sharp turn, 10 out of 10. thanks so much for these tuts, very helpfull!

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

      I always have to go into the rigidbody constraints and lock rotation lol

  • @EnemyOTS
    @EnemyOTS 3 роки тому

    Sir you are a god. the Only tutorial that got the jumping and animation right without headache! so simple thank you so much!

  • @snoozybara
    @snoozybara 2 роки тому +2

    Thanks so much for producing this awesome tutorial!! One quick question: why did you add the jump trigger at the end?

  • @robelgedebu5764
    @robelgedebu5764 6 місяців тому

    you are a living legend

  • @zyke2400
    @zyke2400 2 роки тому +2

    for some reason i can't walk left and right and jump after doing the jumping animation part, any fix for this?

  • @swedcast107
    @swedcast107 2 роки тому

    Mate, i love you! I just implemented a working jumping mechanic in 15 minutes. I have tried for 3 days with other tutorials :D

  • @carrotjuicegangsta272
    @carrotjuicegangsta272 2 роки тому

    Everyone can we all agree that the outro is amazing?

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      Hey, thanks a lot! People weren't really commenting about it so I think I removed it after episode 3, but it's back in the latest one again.

    • @carrotjuicegangsta272
      @carrotjuicegangsta272 2 роки тому

      @@PandemoniumGameDev haha keep up the good work!

  • @boxily
    @boxily 2 роки тому +1

    pretty late but if your charachter falls over when moving its because the hitbox is too small, making it bigger fixes it!

  • @user-gm4iu4gw4p
    @user-gm4iu4gw4p 7 місяців тому +1

    5 stars dude great tutorial!

  • @XAyaDubX
    @XAyaDubX 3 роки тому +1

    Amazing tutorials. Thank you for these. Very underrated.

  • @antoniokventin5341
    @antoniokventin5341 2 роки тому

    Hello, Pandemonium! Very big THX! Thats a best TUTORIAL for animation, which i try!

  • @ferftfm5330
    @ferftfm5330 2 роки тому +1

    If your character jumps poorly, add: [SerializeField] private float JumpPower;
    and in '' private void Jump () '' write JumpForce instead of speed

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

    The best animation tutorial;) !

  • @kikikrik
    @kikikrik 2 роки тому

    thank you Pandemonium this is so helpful i love this 👍

  • @Darkcha05
    @Darkcha05 2 роки тому +1

    I have just finished the jump code but my character is stuck in the jump animation when I'm on the ground and won't allow me to jump. What did I do wrong?

  • @kozinskiandrzej4
    @kozinskiandrzej4 2 роки тому

    Jesus christ man, this is the only tutorial that works from start to end when you follow it

  • @dotnetdojo-cash
    @dotnetdojo-cash Місяць тому

    Excellent content, thank you for your hard work! Loved it!

  • @Youngdeff1
    @Youngdeff1 3 роки тому +2

    New to game dev and your videos have helped me so much! I ran into a small issue where I try to test player movement I can no longer press space to jump and the sprite just floats up off the screen

    • @PandemoniumGameDev
      @PandemoniumGameDev  3 роки тому +2

      If you're not being able to press Space then you probably forgot to assign the "Ground" to the ground object. Not sure about the floating, gimme more details on Discord.

    • @sherlofm7749
      @sherlofm7749 2 роки тому

      @@PandemoniumGameDev same problem here but without the floating, I get stuck in Jump animation when I start the game. Ground object is tagged with ground

    • @sherlofm7749
      @sherlofm7749 2 роки тому

      Fixed it, the OnGameCollision was tagged with the isGrounded bool instead of the Ground bool.

  • @brendancusack391
    @brendancusack391 11 місяців тому

    Loved the first video. Thank yoU!

  • @Leito4Gaming
    @Leito4Gaming 2 роки тому

    I have a doubt. After u created the las parameter "jump" as a trigger, what's the use for the bool grounded parameter?Great tutorial. Thx so much!

  • @dogegamer_yt7482
    @dogegamer_yt7482 2 роки тому +1

    This helped me alot but i had one problem that I am stuck on, when I play the game, when I land, I go into the jumping animation and its just stuck there

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

    W tutorial will work well as a place for me to test and fool around for my first game TYSM

  • @wlw113
    @wlw113 2 роки тому +1

    My grounded bool (in code) doesnt get false when i jump from ground. Pls help

  • @-mammy
    @-mammy Рік тому

    This video series is excellent. You say -oh it is 20 min ı'll finish it in like 30 min but it is soo intense on knowledge you finish it after 1 hour :D

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

    great and easy explanaition,you are a god in coding!

  • @grass5183
    @grass5183 2 роки тому +1

    Hello, I have been following your series and it has been working great, but when I made it so the character faces right/left (coded in near 4:50), my character would get only small when I pressed play. Any ideas?

    • @exmitter236
      @exmitter236 2 роки тому

      I had the same issue when trying to use empty game objects to make a 'Player" parent while this guy just uses a normal 2d game object to create his player, so the line that says transform.localScale = new Vector3(-1, 1, 1); is reverting the scale of the child object even though the parent object's scale never changed from 1 1 1 .

  • @Pavme
    @Pavme Рік тому

    4:06 why do you use -x scale here to make character face the other direction as opposed to changing the rotation?

    • @PandemoniumGameDev
      @PandemoniumGameDev  Рік тому +1

      Seemed easier to implement than the rotation. If I would go back to this now I would also try playing with the Flip Sprite option on the Sprite Renderer component.

  • @nickrev17
    @nickrev17 2 роки тому +1

    hey, just wondering how do you get the different colours for the different parts of the C# code in visual studio? mine has all the standard stuff, but not vectors, 'Input', etc.

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому +1

      Check the pinned comment on video 1, the first point is about autocomplete and how to get it to work.

  • @Plexi.T
    @Plexi.T 2 роки тому +2

    Hey, I don't know if you'll see this but, I'm stuck on the running part. When I play the game the character won't transition between the idle and running animations. On top of that my character will default to facing left even after I just got done tapping the right arrow. Please help

    • @synixyt3326
      @synixyt3326 2 роки тому

      yes. same here. YT channel plz reply
      edit.. hey brooo
      i hope this helps you
      in (else if) line..
      we have to use (horizontalInput < -0.01f)
      instead of (horizontalInput < 0.01f)
      😄

  • @EagleNestGames
    @EagleNestGames 2 роки тому

    Thank you so much for a clear, informative and practical explanation.😊

  • @qusky512
    @qusky512 2 роки тому +1

    I had problems with the jump animations, so in line 37 I changed x to y and now it works :D

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      Glad it works but I'm not sure why :D it's not supposed to. What was the problem you were facing?

    • @carpenstefan8764
      @carpenstefan8764 2 роки тому

      Me too bro. Kudos to you and big kudos to
      Pandemonium. The game is awesome!

    • @donovanbauman8821
      @donovanbauman8821 2 роки тому

      @@PandemoniumGameDev I'm having jumping problems too. The run and idle animations run and play fine, but the jump function does not work.

  • @RIPGojothestrongest
    @RIPGojothestrongest 2 роки тому +1

    When I move the character left and right his scale changes and he becomes giant, how do I stop that from happening?

  • @toastystaken
    @toastystaken 2 роки тому +2

    i followed everything in the tutorial but my character just stays still in the air but still has animations, although they can't jump

  • @rajatmusale1948
    @rajatmusale1948 2 роки тому +1

    How do I get the OnCollisionEnter2D (timestamp 18:58) to be blue? I haven't gotten a single autocomplete that you have in the tutorial, I have had to type it all out.

    • @PandemoniumGameDev
      @PandemoniumGameDev  2 роки тому

      Try this: ua-cam.com/video/g3sHbFmzq3I/v-deo.html&ab_channel=qubodupDev

    • @rajatmusale1948
      @rajatmusale1948 2 роки тому

      @@PandemoniumGameDev Oh thanks mate, this worked!

  • @phoneix24886
    @phoneix24886 2 роки тому

    You deserve a lot more subsribers!

  • @captainjacksparrow9229
    @captainjacksparrow9229 2 роки тому +1

    My character keeps on decreasing in side after the first frame, how do I stop this?

  • @BTLOTM
    @BTLOTM 3 роки тому +2

    I'm loving the videos. Trying to follow along, I've encountered a problem on my end at the very end. When I add the "jump" trigger, the player is now permanently stuck in the jump animation, even when grounded.

    • @Magiclenses
      @Magiclenses 3 роки тому

      yes me too can you please tell me if you find a solution

    • @blaketheshepherd
      @blaketheshepherd 3 роки тому

      I had the same problem. I was missing a line of code at line 33.
      You can see it in the video at 20:50.
      Here is the code:
      anim.SetBool("isGrounded", isGrounded);

    • @ashleymunozrufino
      @ashleymunozrufino 3 роки тому

      @@blaketheshepherd I still have the same problem even though I had that line of code in mine.

  • @arjunkhanna7383
    @arjunkhanna7383 2 роки тому

    Thank you so much for the explanations of the code! I found them to be extremely helpful!

  • @priyanshunagar2807
    @priyanshunagar2807 11 місяців тому

    4:32 why to use vector 3 when we are playing with 2 axis only ????

  • @teamofwinter8128
    @teamofwinter8128 2 роки тому

    I really really wish that was the way i started this whole unity tutorial instead of looking up youtube how to do a certain feature and then the feature i learn bugs out another feature then i look up how to fix it and OH man its such a headache but this is the right way to learn atleast in the beigining plus you explained everything very well and you didnt leave a thing unexplained and i appreciated it from the start to finish even though i knew alot of the stuff you already explained