更新时间:2022-04-18 21:37:24
您可以做的是为不同类型的游戏对象创建一个图层蒙版.然后,打开您的Physics2D设置.
What you can do is create a layer mask for the different type of game objects. Then, open your Physics2D settings.
在底部,您可以看到一个物理对象矩阵,它们可以相互碰撞.只需取消选中哪一层不应与另一层碰撞即可.
On the bottom part, you can see a matrix of physics objects that can collide to one another. Just uncheck which layer should not collide with the other.