且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

禁用或启用基于对象标签 Unity 2d 的碰撞

更新时间:2022-04-18 21:38:00

你可能想要 看看层.

通过将不同的对象分配给不同的层,您可以将它们设置为相互碰撞或忽略任何潜在的碰撞.您可以在

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.