- Home /
Question by
faridphenom · Jul 15, 2017 at 11:11 AM ·
collisiontriggermaterial
problem with collision and trigger
Hi,i'm building a game that balls came from left and right and bouncing on the canvas, but i can't figure out how to set that balls so they don't collide with each other? When i checked the isTrigger for my canvas but balls don't bounce and pass through the canvas although i specified in the code to react with balls. How must fix this problem?
Comment
Best Answer
Answer by OperationDogBird · Jul 15, 2017 at 12:03 PM
You can add the balls to a layer.
Edit > Project Settings > Tags & Layers. Create a layer for your ball and assign the layer to your ball/prefab.
Then edit the collision matrix. Edit > Project Settings > Physics. Uncheck the ball/ball collision checkbox.