#how do i change collision layer in code

8 messages · Page 1 of 1 (latest)

tawny gorge
#

so i wanna remove collison layer 1 from a Characterbody2d but i cant see to find the right property. Could someone help me

daring crystal
#

It's under the CollisionObject section

tawny gorge
#

hii, yea but i wanna change it in the script. like i wanna remove a collsion layer when soemthing happens in the script

short roost
#

whatever.collision_layer = 0

tawny gorge
#

thank you so much

daring crystal
#

The set_collision_layer_value() function is generally a better option