Unity如何碰撞物体消失

2024-10-12 11:29:23

1、首先打开unity软件

Unity如何碰撞物体消失

3、我们添加三个物体(两个正方体和一个圆体)

Unity如何碰撞物体消失

5、我们输入:(如图所示)if (other.tag == "one") { Destroy(other.gameObject); }

Unity如何碰撞物体消失
猜你喜欢