Godot Collision Layers and Masks… the EASY Way

  Рет қаралды 11,158

Bacon and Games

Bacon and Games

Күн бұрын

Пікірлер: 76
@ChaoszZChannel
@ChaoszZChannel 7 ай бұрын
Great stuff, a lot of tutorials tend to forget that physics layers exist or never care to explain how it works.
@baconandgames
@baconandgames 7 ай бұрын
Thanks!
@AbyssMerchant
@AbyssMerchant 7 ай бұрын
Thank you for the vid! Too many times have randomly clicked on the layers and masks hoping stuff just "clicks together" lol
@baconandgames
@baconandgames 7 ай бұрын
You’re welcome!
@birbothealpha
@birbothealpha 18 күн бұрын
wow you are seriously a fantastic teacher, you explained all of this better than 99% of the tutorials i have watched on here
@baconandgames
@baconandgames 17 күн бұрын
🥹 👉👈 - thank you
@OHTASISAN
@OHTASISAN 7 ай бұрын
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 7 ай бұрын
Oh gosh. Thank you so much. YT is a rough gig. I don’t know how much you realize comments like this mean. 🥹
@nkbdl
@nkbdl 3 ай бұрын
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 3 ай бұрын
Thanks! I like the one topic format as well 🙂
@ravveni
@ravveni 7 ай бұрын
really appreciate all the various examples of using collision layers and masks! awesome tutorial!
@baconandgames
@baconandgames 7 ай бұрын
🤜🤛 I’m glad you found it helpful!
@GameDevJourney
@GameDevJourney 2 ай бұрын
Great video, Bacon - really helpful! Would love to see the video about the interactions in code.
@baconandgames
@baconandgames 2 ай бұрын
Thanks! I’ll add that to my list.
@mrussogamedev
@mrussogamedev 7 ай бұрын
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 7 ай бұрын
You’re welcome! Thanks for watching and for the kind words. 🙏
@marcusgray3525
@marcusgray3525 5 ай бұрын
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 5 ай бұрын
Thank you, thanks very kind of you to say!
@RG-ef8vm
@RG-ef8vm 4 ай бұрын
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 4 ай бұрын
You're very kind. Thanks for watching and for the kind words. Good luck with your project!
@valeriacalzona9830
@valeriacalzona9830 2 ай бұрын
very useful video! it helped me understand quickly and easily the difference between the two and how to use them. thank you very much
@baconandgames
@baconandgames 2 ай бұрын
I’m so glad! Good luck with your project 👏
@mrserlysir
@mrserlysir 25 күн бұрын
thanks for the video it helped me understand the physics layers and how to think about godot
@baconandgames
@baconandgames 25 күн бұрын
Lovely! Thanks for the kind words!
@murifox_
@murifox_ 6 ай бұрын
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 6 ай бұрын
Aw geez. Thank you. What a kind thing to say. 🥹
@gunaruni4564
@gunaruni4564 4 ай бұрын
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 4 ай бұрын
I know that feeling (and I still struggle from time to time with it). I'm glad this helped! Good luck with your project!!!
@taronzgaming7739
@taronzgaming7739 5 ай бұрын
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 5 ай бұрын
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) kzbin.info/www/bejne/mWirgqquqJqsbtk 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.
@GenTink
@GenTink 7 ай бұрын
This is so well put and easy to understand. Thank you. Fantastic video.
@baconandgames
@baconandgames 7 ай бұрын
I appreciate that. Thank you 🙏
@Bitlytic
@Bitlytic 7 ай бұрын
Sick video! This will be super handy for beginners learning about collisions
@baconandgames
@baconandgames 7 ай бұрын
Aww. That’s the hope. Thanks so much for watching! 🙏
@alexxander7289
@alexxander7289 3 ай бұрын
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 3 ай бұрын
You’re welcome you’re welcome ☺️
@jakerosper9239
@jakerosper9239 6 ай бұрын
Great explanation and examples! I needed that. Yes do another vid on the coding side of interactions please.
@baconandgames
@baconandgames 5 ай бұрын
Right on, thanks! 🙏
@YCLPaiva
@YCLPaiva 6 ай бұрын
thank you! it helped me a lot
@baconandgames
@baconandgames 6 ай бұрын
Glad it helped!
@ince55ant
@ince55ant 6 ай бұрын
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 6 ай бұрын
I love that. I’m renaming the channel to Bacon and Games and Coffee 😀
@LaurenHowellNCC1701D
@LaurenHowellNCC1701D Ай бұрын
Thank you! Very helpful :)
@baconandgames
@baconandgames Ай бұрын
Thank you :) 🙏
@tronalddump8442
@tronalddump8442 5 ай бұрын
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 5 ай бұрын
I think this video covers it but let me know if you get stuck: kzbin.info/www/bejne/fISymWCvfZd5r6M
@toniok.4726
@toniok.4726 6 ай бұрын
Too underated ❤❤
@baconandgames
@baconandgames 6 ай бұрын
🙌
@DeadIndGames
@DeadIndGames 7 ай бұрын
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 7 ай бұрын
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 7 ай бұрын
@@baconandgames I would love that!!
@baconandgames
@baconandgames 7 ай бұрын
@DeadIndGames drop into my Discord and shoot me a DM. I’ll zip it up for you.
@DeadIndGames
@DeadIndGames 7 ай бұрын
@@baconandgames okay when I get a chance to hop on I'll do that! Thanks!
@baconandgames
@baconandgames 7 ай бұрын
@DeadIndGames 👍
@seasonphan
@seasonphan 4 ай бұрын
great video!
@baconandgames
@baconandgames 4 ай бұрын
❤️
@ZB_95
@ZB_95 6 ай бұрын
thank you! earned a sub
@baconandgames
@baconandgames 6 ай бұрын
Thank YOU ☺️
@dibaterman
@dibaterman 7 ай бұрын
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 7 ай бұрын
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. 🌈
@godofdream9112
@godofdream9112 3 ай бұрын
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 3 ай бұрын
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 3 ай бұрын
@@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 3 ай бұрын
@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.
@diotone5580
@diotone5580 3 ай бұрын
Can you do one on Tilemap layers? Tilemap is deprecated.
@baconandgames
@baconandgames 3 ай бұрын
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 3 ай бұрын
@@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 3 ай бұрын
@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 3 ай бұрын
@@baconandgames Will do, thanks!
@J3ff_K1ng
@J3ff_K1ng 19 күн бұрын
if you want to do the free travel thing but with multiple object how would yo do it? because idk if godot creates a different "script" per obj so Im not sure about changing the script in case it affects every instance
@baconandgames
@baconandgames 19 күн бұрын
I would probably use composition. You’d create a node that can be dropped onto any object that might “care” about being in free travel. It probably wouldn’t do much more than handle that flag and allow you to read or write it. Then, whenever relevant, then you could check for whether an object is part of that system with has_method (one of many ways to check if an object adheres to some standard such as being a part of the “free travel” system you’ve written) and then act accordingly. Godot is full of ways (perhaps too many) to set up these kinds of systems. You could have a group that you apply to things that need to be part of free travel (and you can add/remove things from groups all the time), you could use metadata (I don’t recommend this, but sometimes it makes sense), you could even use inheritance to bubble up this property to anything you want as part of your “free travel” system. Godot is designed to allow you to mix inheritance and composition, but I feel like it favors composition more. You might find this video on composition v inheritance very helpful: kzbin.info/www/bejne/bWXcZ62Nj8uEgc0
@J3ff_K1ng
@J3ff_K1ng 19 күн бұрын
@baconandgames I think I get it, I'm gonna code it and see what happens Thank you so much
@baconandgames
@baconandgames 19 күн бұрын
@J3ff_K1ng That’s the right answer! Nothing beats trying it yourself. Good luck! If you get stuck or want feedback, please come by the Discord (link in bio) and someone will give you a nudge :) Happy coding!
@blasttrash
@blasttrash 4 ай бұрын
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 4 ай бұрын
I suspect you are correct about that
Player Input & Setup: Godot 4 Snake Tutorial
21:07
Bacon and Games
Рет қаралды 3,2 М.
Godot Tile Maps Are Dead ...Long Live TileMapLayers
11:02
Gamefromscratch
Рет қаралды 49 М.
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
Непосредственно Каха: сумка
0:53
К-Media
Рет қаралды 12 МЛН
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН
This Godot SceneManager Does even MORE now!
35:07
Bacon and Games
Рет қаралды 8 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
Godot Scripts I add to Every Game
12:34
Aarimous
Рет қаралды 56 М.
How Not To Make An Environment
24:43
caponeart
Рет қаралды 27 М.
Every 2D Node Explained in 9 Minutes !
9:19
Lukky
Рет қаралды 386 М.
How I Beat Minecraft From One Grass Block
35:27
Beppo
Рет қаралды 3,6 МЛН
Creating a window - Software from Scratch
1:04:12
Muukid
Рет қаралды 169 М.
Boost Your Productivity with One TINY Change 📈
6:46
Bacon and Games
Рет қаралды 552
Kerbal Space Program 2 Was Murdered.
11:26
Bellular News
Рет қаралды 36 М.
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН