Godot Collision Layers and Masks… the EASY Way

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

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

  • @ChaoszZChannel
    @ChaoszZChannel 4 месяца назад +12

    Great stuff, a lot of tutorials tend to forget that physics layers exist or never care to explain how it works.

  • @OHTASISAN
    @OHTASISAN 4 месяца назад +5

    This was a great video. The structure was incredibly easy to follow along with and seeing the practical applications visually really let it sink in for me. Keep up the good work!

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

      Oh gosh. Thank you so much. YT is a rough gig. I don’t know how much you realize comments like this mean. 🥹

  • @AbyssMerchant
    @AbyssMerchant 4 месяца назад +6

    Thank you for the vid! Too many times have randomly clicked on the layers and masks hoping stuff just "clicks together" lol

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

    I'm very new to game development and coding in general. I'd be very keen to see you tutorialize a project like you mentioned here, as you seem to do a good job at explaining what you're doing and why!

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

      Hey, thanks so much! I've been trying to come up with a small project to take folks through start to finish (aside from my Snake tutorial from when I first started the channel) ruclips.net/video/c7HQwxs5y8w/видео.html
      Stay tuned. And good luck with your gamedev journey! If you get stuck, please come by the Discord and we'll do our best to help out.

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

    thanks, great video. Layer and Mask is one of Godot features that much like Tileset is overwhelming at first glance, really take effort to grasp it but once you get used to it it all makes sense.

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

      You’re welcome! Thanks for watching and for the kind words. 🙏

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

    really appreciate all the various examples of using collision layers and masks! awesome tutorial!

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

      🤜🤛 I’m glad you found it helpful!

  • @alexxander7289
    @alexxander7289 9 дней назад

    i like the way you place the URL of the tutorial video in your guthub projects. ty!
    i also really like it when you put timestamps in your videos. ty ty !!
    AND I REALLY REALLY appreciate it when you separate you projects from version 1 and version 1.1+ ty ty ty !!!

    • @baconandgames
      @baconandgames  8 дней назад

      You’re welcome you’re welcome ☺️

  • @RG-ef8vm
    @RG-ef8vm Месяц назад

    Wow. I didn't know the Extra Credit differentiation between setting the layer on a crate, vice setting the mask on the crate, and the wildly different results from the collision with the player. Thanks for that...and your video as a whole.

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

      You're very kind. Thanks for watching and for the kind words. Good luck with your project!

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

    I think they shouldnt have called it "mask". I think they were using the programming terms(since its a bitwise mask). Instead they should have called it something else I think

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

      I suspect you are correct about that

  • @marcusgray3525
    @marcusgray3525 3 месяца назад

    Thanks for putting together such an easy to follow tutorial. I enjoyed the way you presented the material and didn't make me feel like I was absolutely losing my mind trying to understand this topic. Subscribed!

    • @baconandgames
      @baconandgames  3 месяца назад

      Thank you, thanks very kind of you to say!

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

    Wonderful tutorial, helped me out a bunch! But just wondering whether you could do a tutorial on how to make pushable objects for a top down game like you did with the rock above the secret ladder.

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

      I think this video covers it but let me know if you get stuck:
      ruclips.net/video/FSOh-yH2FyA/видео.html

  • @YCLPaiva
    @YCLPaiva 3 месяца назад +1

    thank you! it helped me a lot

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

    Yep, I just remember that the top one is not for detection. It's odd sure but that's how I keep it in mind, I am super lazy about naming them though. >.

    • @baconandgames
      @baconandgames  4 месяца назад +1

      Naming is a good practice to get into and it doesn’t take that long. Be kind to your future self. Name your layers and masks. 🌈

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

    my brain just refuses to absorb this stuff. (like i do it at start of project in a way i never have to really deal with again)
    so its good to have wee reference vids i can watch while having a coffee

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

      I love that. I’m renaming the channel to Bacon and Games and Coffee 😀

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

    Good and decently short video. I think it is great that a tutorial focuses on one single topic instead of trying to do too much. Thanks.

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

      Thanks! I like the one topic format as well 🙂

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

    Oh my god, you saved me! I for the love of god do not know what is collision layer and mask, so thank you!

    • @baconandgames
      @baconandgames  Месяц назад +1

      I know that feeling (and I still struggle from time to time with it). I'm glad this helped! Good luck with your project!!!

  • @jakerosper9239
    @jakerosper9239 3 месяца назад

    Great explanation and examples! I needed that. Yes do another vid on the coding side of interactions please.

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

    This is so well put and easy to understand. Thank you. Fantastic video.

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

      I appreciate that. Thank you 🙏

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

    Sick video! This will be super handy for beginners learning about collisions

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

      Aww. That’s the hope. Thanks so much for watching! 🙏

  • @godofdream9112
    @godofdream9112 25 дней назад

    how to ensures that the mouse input will not interact with the bottom Area2D when the top Area2D is overlapping. same node instances.

    • @baconandgames
      @baconandgames  20 дней назад

      Hi there. I'm sure the issue you're trying to solve is more complex than you've shared here so it's going to be tough to give you an answer. Have a look at the "pickable" property. That may help.

    • @godofdream9112
      @godofdream9112 20 дней назад

      @@baconandgames i solved my problem using button instade of area2d... however here is my problem in detail...
      terget: multiple playing_card instance with area2d, when mouse entered on that card that card should bounce a little to indicate you are on that card.
      problem: now every thing is working, but IF YOU HAS 2 CARD PARTIALLY ON TOP OF EACH OTHER, BOTH OF THEM ARE BOUNCING. where i wanted to mask out active area of down_card with top_card.
      like if visually you are not on top a card, that card should not do the bouncing.
      I hope, i am more or less successful to tell you the problem.

    • @baconandgames
      @baconandgames  20 дней назад

      @godofdream9112 my guess is you have code on each card node that’s handing that bouncing you described. One way to solve this problem is not to let each card, which know nothing about out each other, manage that behavior. If you had a manager that all the cards reported into looking at “which one is being hovered” it to make sure that only the one you want shows the effect you’re after. So the cards would report information about how/when they’re being interacted with and the manager would have access to their properties and could decide for ALL cards how each cards behave. Think of it like a conductor in an orchestra being responsible for keeping time for everyone playing, rather than each musician having their own metronome.

  • @murifox_
    @murifox_ 3 месяца назад

    I think you are probably one the best godot/gamedev teachers that I discover searching for these topics.
    Keep up the great work!

    • @baconandgames
      @baconandgames  3 месяца назад

      Aw geez. Thank you. What a kind thing to say. 🥹

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

    Is this a project you are working on or just something you threw together for this video? I have an idea for a 2D game and some of these concepts you showed would translate to my idea really well and was wondering if you had the project files available?

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

      It’s a prototype I’m working on but I’m not very far along. I’ll give you a copy of the project if you want.

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

      @@baconandgames I would love that!!

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

      @DeadIndGames drop into my Discord and shoot me a DM. I’ll zip it up for you.

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

      @@baconandgames okay when I get a chance to hop on I'll do that! Thanks!

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

      @DeadIndGames 👍

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

    thank you! earned a sub

  • @diotone5580
    @diotone5580 6 дней назад

    Can you do one on Tilemap layers? Tilemap is deprecated.

    • @baconandgames
      @baconandgames  6 дней назад

      I would but the change is negligible. Tilemaps have layers contained within them as a drop down. Tilemap layers are those layer drop downs exploded into individual nodes. That’s really the main difference. Everything else in this video applies to TilemapLayers.

    • @diotone5580
      @diotone5580 6 дней назад

      @@baconandgames Okay I'm very new to this engine so I thought it was major change. I added a physic layer 0 to a couple of tiles but my character can still walk over them instead of being blocked. I made sure I added the necessary collision layers to the Tilemap and Player. Does your Hero node contain another component affecting collision?

    • @baconandgames
      @baconandgames  6 дней назад +1

      @diotone5580 find me in my Discord channel. I’ll give you the project so you can see how I have it set up. 😃

    • @diotone5580
      @diotone5580 6 дней назад

      @@baconandgames Will do, thanks!

  • @toniok.4726
    @toniok.4726 3 месяца назад

    Too underated ❤❤

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

    great video!