更新时间:2021-08-12 22:35:18
Instead of doing this via tags, you might want to have a look at layers.
通过将不同的对象分配给不同的图层,可以将它们设置为彼此碰撞或忽略任何潜在的碰撞.您可以在以下位置实现
By assigning different objects to different layers, you can set them to either collide with each other, or ignore any potential collisions. You can achieve this at
编辑->项目设置->物理
Edit->Project Settings->Physics
您可以在其中编辑图层碰撞矩阵,以启用或禁用图层元素之间的碰撞.
where you can edit the layer collision matrix, to enable or disable collisions between layer elements.