레이어 끼리의 충돌 무시하기

|

Physics2D.IgnoreLayerCollision(8,9);


Start함수에 이걸 적어주면 해당되는 번호의 레이어끼리는 충돌을 무시한다.

레이어 번호는 Tags & Layers 에서 볼수 있다.


아래는 API







Physics2D.IgnoreLayerCollision

static void IgnoreLayerCollision(int layer1, int layer2, bool ignore = true);
Parameters

layer1ID of the first layer.
layer2ID of the second layer.
ignoreShould collisions between these layers be ignored?
Description

Choose whether to detect or ignore collisions between a specified pair of layers.


Trackback 0 And Comment 0