#Collisons and area2D

8 messages · Page 1 of 1 (latest)

neon breach
#

I want to know if theres a way to make area2D only check certain collisons

hollow rivet
#

you can use layers and masks

#

in the inspector, look at the "collision" part. The "Layer" is this objects own position, the "mask" is the layers the area is gonna look out for

#

in this picture, for example, the Area 2D is on layer 1, and can detect objects that are in layers 1, 2 and 3

#

if there was an object set on layer 4, this Area2D wound't find it

#

and yes... it will detect itself

neon breach
#

oh ok

#

and i could use a different area 2D to detect different collsions