#am i misinterpereting documentation

31 messages · Page 1 of 1 (latest)

edgy cloud
#

I set all my child and parent nodes collision layer to one and mask and two
THEY ARE STILL COLLIDING WITH EACHOTHER. it only stops when i change the collision layer to not one
i thought you only collide with the objects on your collision mask
in my case its two
and none of my objects are on layer two

#

i tried some testing and this is my mask in gui(above)
but when i print it ```swift
print(collision_mask)

it show 1
coral wharf
#

Collision Layer means "Hello, I exist in this layer."
Collision Mask means "I am able to see anything that is in this layer."

opal pecan
#

And you're in Godot 4?

edgy cloud
edgy cloud
static basalt
#

_ready() function?

static basalt
#

and you are sure that it is set to 2 in the editor, and there is nothing in the script or any other script changing the mask when you run the game?

#

or animationplayers

edgy cloud
#

yes

static basalt
#

did you check in the remote tab while its running if the masks are set correctly?

edgy cloud
#

let me do that

#

it says mask 1 in the remotre

#

but not in editor

static basalt
#

are you running any other code in the ready function? do you instantiate this object with the wrong mask via code or is it already in the scene in the editor?

edgy cloud
static basalt
#

what node type is it? is it a child of any other physics object?

edgy cloud
#

its a static body
and it has other static body children

static basalt
#

i dont think its a good idea to have static bodies as children of static bodies

#

but not sure it that is the reason for the wrong mask

#

might be

edgy cloud
#

what should i do
i want the piston rod and piston cap to collide with the player

static basalt
#

but not the piston itself?

edgy cloud
#

yes

static basalt
#

i dont think thats possible this way

#

you would have to make the rod and rod cap siblings, not children imo

edgy cloud
#

so i need a big papa node2d with everything in it

static basalt