[英]Player is moving through the Wall in Unity 3D
I am making a simple game where the Player moves only Horizontally and the Enemies spawn from front.我正在制作一个简单的游戏,玩家只能水平移动,而敌人则从前面产生。 I created a Wall at the Left and Right side of the Player.
我在播放器的左侧和右侧创建了一个墙。 But, Player keeps going through the Wall even when I have added Rigidbody component to Walls and Player.
但是,即使我在 Walls 和 Player 中添加了 Rigidbody 组件,Player 也会继续穿墙。 I used Cube gameobject to make a wall.
我用立方体游戏对象制作了一堵墙。 Please help.
请帮忙。 Thank you!
谢谢!
I have NavMesh agent on my player and what helped me:我的播放器上有 NavMesh 代理,这对我有什么帮助:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.