2 Ways to do a Ground Check | Unity 2D Platformer Tutorial #2

Поделиться
HTML-код
  • Опубликовано: 16 дек 2024

Комментарии • 53

  • @Chordily
    @Chordily 2 месяца назад +2

    I'm currently majoring in video game design in uni and our first big project is making a 2D game. I was having trouble getting the Ground Check that was included in our base template working since I've customized about 90% of the files and scripts. This video finally got it working, so I thank you. And thank you for explaining it in a way that we're able to learn from.

    • @dexxylinx
      @dexxylinx Месяц назад

      yo do you go to murdoch cause same LMFAO

    • @Chordily
      @Chordily Месяц назад

      @ no, Boise state

  • @ghostfrenchman6133
    @ghostfrenchman6133 Год назад +2

    I just want to say that this video was amazing! The quality was on point and you explained it very well. Keep Going!

  • @SlogoJellyCrainerYT
    @SlogoJellyCrainerYT 11 месяцев назад +1

    I was looking for a way to this for hours, and you helped me in just 5 minutes. Thanks so much!

  • @dominikfischer5175
    @dominikfischer5175 Год назад +1

    I really like your indepth explanation. Looking forward to more videos :)

  • @devrodSantos
    @devrodSantos 11 месяцев назад

    Thank youuuuuuuuu!!!! You nailed it!!!! Thank you for creating this tutorial!! Finally, I found a simple way to prevent jumping on ground elements. 🥳🥳🥳🥳👍👍👍👍👊

  • @SHIVAMSHARMA-ok5mo
    @SHIVAMSHARMA-ok5mo 3 месяца назад +1

    When i change boxsize values it is not showing the gizmos lines

  • @Solu-tion
    @Solu-tion Год назад +2

    This video was great! You explained everything in a way I could understand, I please continue to make tutorial videos like these it really helps out beginner game developers like me can you maybe make a video on how to make the player shoot a projectile like a fireball for example? That would be great!

  • @sadoki
    @sadoki Год назад +1

    Everyone is doing it with collision which never works for me, thank you for showing 2 methods (Raycast the one works for me), thank you a lot!

  • @Milk_Cup1119
    @Milk_Cup1119 Месяц назад

    I don't know why, but when I use the collider method and walk into a corner, the grounded variable chanegs to false and never changes back

  • @aivin517
    @aivin517 11 месяцев назад +1

    god bless me recommend ur youtube channel

  • @michamarkiewicz5355
    @michamarkiewicz5355 Год назад +1

    Problem with this collider ground check (at least for me) is that if you collide with more than one ground at the same time (which should be normal in platformer games) and you exit collision with one of them, grounded variable is gonna be set to false even though you may be on the ground if that makes sense.
    I fixed it by using OnCollisionStay2D in place of OnCollisionEnter2D, though I would assume OnCollisionStay2D is not much performant as it is called each frame
    I'll let you guys know if I'll come up with something better

    • @morebblakeyyy
      @morebblakeyyy  Год назад +1

      Yep, which is also another reason I prefer the second method, raycasting

    • @michamarkiewicz5355
      @michamarkiewicz5355 Год назад

      @@morebblakeyyy I'll try it thanks, I looked up few different tutorials but this the best one I found on the topic. Thanks for the content

  • @qualaycalvin-rn5lp
    @qualaycalvin-rn5lp 4 месяца назад

    I'm using unity's input systems for my jump how can i adapt this

  • @junba1810
    @junba1810 2 месяца назад

    Nice tutorial. Thanks!

  • @kylemorely1812
    @kylemorely1812 10 месяцев назад

    Is there a way for the boxcast to detect everything, not just things that have the "ground" layermask?

  • @Odnem1706
    @Odnem1706 Год назад

    I really like your explanations! Keep it up, I can't wait for the nex part 👍

  • @am4n439
    @am4n439 Год назад

    i have an issue in the ray cast method , in the collider ground check method the player is jumping properly but as soon as I used the raycast method the player is not jumping anymore , plss help me

  • @sessizinsan1111
    @sessizinsan1111 4 месяца назад

    Is it possible to collider and raycast at the same time?

  • @north3198
    @north3198 Год назад

    this saved me a lot of hours slamming my head against the wall lol, much appreciated :)

  • @opsmation6760
    @opsmation6760 Год назад +1

    hey i was adding some other things and now my castDistance box is being shown in the game, how can i fix this?

    • @opsmation6760
      @opsmation6760 Год назад +1

      i activated the gizmo in game view smh, im so silly but grateful i found the solution thank the lord lol

    • @morebblakeyyy
      @morebblakeyyy  Год назад

      It happens :p

    • @VarunAiyar
      @VarunAiyar 5 месяцев назад

      Thank you

  • @hobo-divisionlive276
    @hobo-divisionlive276 Год назад

    hey so I'm tryna make pacman and like great up and down but the problem is how do i have it testify for the side of the box

  • @AntonioxLOL
    @AntonioxLOL Год назад

    Great tutorial! Thank you!☺

  • @OwenRussell-rr1st
    @OwenRussell-rr1st 4 месяца назад

    Thanks so much! A wonderful help.

  • @VeggieVampy
    @VeggieVampy Год назад

    could you do a tutorial on chaarcter customization? thank you!

  • @pizzakingx58
    @pizzakingx58 Год назад

    I like your tutorials keep it up :D

  • @cantthinkofname4138
    @cantthinkofname4138 Год назад

    I got this error: Assets/Controller.cs(54,22): error CS0117: 'Physics2D' does not contain a definition for 'Boxcast'

  • @neriya5393
    @neriya5393 Год назад

    theres a way to make CastDistance for the X and not only for the y?

    • @setofaro
      @setofaro 9 месяцев назад

      Yes swap the 0 and the cast direction

  • @apocalypticpandas
    @apocalypticpandas Год назад

    amazing keep up the work!

  • @LDEV-l3p
    @LDEV-l3p 7 месяцев назад

    I don't understand such a commonly used method. Why doesn't Unity make it a built-in method? Godot has the on_the_floor method for detection, and Unity has developed for so many years and still requires manual detection every time.

  • @leonlele7983
    @leonlele7983 5 месяцев назад

    very good video, thank you

  • @Margerrat
    @Margerrat Год назад

    Hey really good tutorial but the grounded check isn’t working for me

    • @Margerrat
      @Margerrat Год назад

      Nvm I fixed it

    • @stormflash4603
      @stormflash4603 Год назад

      @@Margerrat how Im having the same issue and I cant fix it (I'm using the ray cast method)

  • @Unicat69420
    @Unicat69420 2 дня назад

    bruh I decided to switch to the raycast method, it didn't work and I just wasted my time

  • @rutorikouman9386
    @rutorikouman9386 6 месяцев назад

    thanks man

  • @danseptemStudios
    @danseptemStudios Месяц назад

  • @johnjohnes698
    @johnjohnes698 Год назад +4

    dude, can you please go even faster? or even faster than that? as a beginner, I can tell you are a bit too slow. you know, the faster you click all the tabs, buttons, use all shortcuts etc, the faster you explain things, the better it is. faster! it doesn't matter people have to rewind the video here and there, because they might have missed the millisecond you used to click or explain something. that does not really matter. go faster! go challenge the speed of light.

    • @morebblakeyyy
      @morebblakeyyy  Год назад +3

      You can increase the speed of the video on RUclips

    • @shamangrayson8143
      @shamangrayson8143 Год назад +8

      @@morebblakeyyy Keep doing what you're doing, the time you take to fully explain things is perfect for beginners trying to learn.

    • @bahamutaxiomx8706
      @bahamutaxiomx8706 Год назад

      @@shamangrayson8143 Yeah, I have to totally disagree with that. It's already a bit fast for me, also a beginner.

    • @morebblakeyyy
      @morebblakeyyy  Год назад

      Again you can change the speed of the video on RUclips, not really possible to find a pace that can help everyone

    • @bahamutaxiomx8706
      @bahamutaxiomx8706 Год назад

      @@morebblakeyyy Actually, I replied to the wrong person. I’m fine with your current speed since I can make it slower.