Godot 4 Push Objects Tutorial

preview_player
Показать описание
Quick tutorial on how to push objects in Godot 4!!!
Shout out to @MK_Codes who helped write this episode.
Рекомендации по теме
Комментарии
Автор

Important info for those who don't know: collision_layer and collision_mask are bitmasks which means they use 32 1s and 0s (trues and falses) to represent themselves, which also happens to be what an integer is. The code in the video works as intended because the integer 1 is just the first number being a 1 followed by a bunch of zeros which makes the first layer/mask true and the rest false. The integer 2 is a 0 followed by a 1 followed by a bunch of zeros which makes only the second layer/mask true and the rest are false.

However, the integer 3 is two 1s followed by zeros. That doesn't make the layer/mask only 3, it makes the layer/mask 1 AND 2 will all the other layers/masks false (only layer 3 as true on a bitmask would be 4 as an integer).

Moral of the story: if you ever need to set collision layers and masks in code make sure to research how to convert a bitmask into an integer as you will most likely (and should be) using more than 2 collision layers in your projects.

toostic
Автор

Sick tutorial! The area for stopping the RigidBody from falling through the floor is a good idea, I never thought of that, thanks!

MK_Codes
Автор

thanks man i have been stuck for ages looking for the seluotion, and so much infrmation in only 2 min

mando
Автор

The number of things you have to account for and program yourself in godot is boggling. I'm only at like intermediate level of game dev at this point, but I start wishing that player and rigid/physics interactions had standard features anticipated in the engine where you don't awkwardly crush boxes you stand on top of.

wolcamophone
Автор

How to make a char body2D push a char body 2D. As we cant apply Physics/

fading-sun-studios
Автор

Hello gwizz. Please make a tutorial along screen position touch detection. Thank you for earlier👍👍👍

xydownik
Автор

ez, simple no bs
best tutorial thnx man ❤

pirates
Автор

Great, quick tutorial and exactly what I was looking for! Just to make sure I'm following correctly, is this disabling the box object's collision with the player when the player jumps on top of the box, so the player is colliding with the box, but the box is only colliding with the floor?

mediocretes
Автор

How to make 3d camera rotation on mobile device?

Boy.dian
Автор

I was literally about to search this up and you just came out of nowhere in my home page WW
But could you make one in top-down?
They dont seem to move an inch when I set the physicsbody2Ds gravity property to 0

AxisCoords
Автор

Could you make a tutorial for how to make a board game or at least how to make a grid or a tile that aceppts multiple players occupying it?

barneystinson
Автор

PLS MAKE A TUTORIAL ON THE WEEPING ANGELS MODE. Like the enemy will move towards u when ur not looking at it and won't move when ur not.

devsharan
Автор

how to pull rigid bodies use add_constant_force???

make tut pls

Flamebamboo
Автор

bro please respond. ur old multiplayers i think are out of date. when i exit the game in the multiplayer. it doesnt exit on other side. so a static body is floating in the sky. how to fix this please. i used everything i could. nothing seems to work.

Cozerz