summaryrefslogtreecommitdiff
path: root/src/blog/temp
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2023-08-29 04:17:09 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2023-08-29 04:17:09 -0600
commite6fb8b69c85894994d649b4c7c59a6a1fa606c34 (patch)
treeda723dabaac5128634eddeecf9f982f899f604cf /src/blog/temp
parent06184c13af639917e1af5a1bc298b0022c1398ea (diff)
add godot layer notes
Diffstat (limited to 'src/blog/temp')
-rw-r--r--src/blog/temp/godot_collision_layers_notes.md12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/blog/temp/godot_collision_layers_notes.md b/src/blog/temp/godot_collision_layers_notes.md
deleted file mode 100644
index a8df1da..0000000
--- a/src/blog/temp/godot_collision_layers_notes.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Notes on layers and masks
-
-Taken from a comment from https://ask.godotengine.org/4010/whats-difference-between-collision-layers-collision-masks:
-
-1. If enemy's mask and object's mask are set to 0 (i.e. no layers), they will still collide with the player, because the player's mask still includes their respective layers.
-2. Overall, if the objects are `A` and `B`, the check for collision is `A.mask & B.layers || B.mask & A.layers`, where `&` is bitwise-and, and `||` is the or operator. I.e. it takes the layers that correspond to the other object's mask, and checks if any of them is on in both places. It will they proceed to check it the other way around, and if any of the two tests passes, it would report the collision.
-
-Also, in the same link (which in turn is taken from https://kidscancode.org/blog/2018/02/godot3_kinematic2d/):
-
-1. `collision_layer` describes the layers that the object appears in. By default, all bodies are on layer `1`.
-2. `collision_mask` describes what layers the body will scan for collisions. If an object isn’t in one of the mask layers, the body will ignore it. By default, all bodies scan layer `1`.
-