Unity如何碰撞物体后移(移动)

2024-10-11 19:28:00

1、首先,我们双击打开unity 3d软件

Unity如何碰撞物体后移(移动)

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

Unity如何碰撞物体后移(移动)

5、我们输入:(如图所示)if (other.tag == "two") { other.transform.Translate(-Ve艘早祓胂ctor3.forward * 5);}进行保存

Unity如何碰撞物体后移(移动)
猜你喜欢