简体   繁体   English

字符卡在瓷砖上 unity3d

[英]Character stuck on a tile unity3d

I have no idea what to say, but I have this image which shows how the character is stuck, the character gets stuck when I try to jump couple times, character is not falling.我不知道该说什么,但我有这张图片显示了角色是如何被卡住的,当我尝试跳跃几次时角色卡住了,角色没有跌倒。

if I jump 1 more time, the character jumps and drops to the ground如果我再跳 1 次,角色就会跳到地上图片

Here is movement code (didn't want to paste it here cuz it is kind of big)这是运动代码(不想在这里粘贴,因为它有点大)

oh and btw this is 2.5d game, 2d in a 3d engine哦,顺便说一句,这是 2.5d 游戏,2d 在 3d 引擎中

Maybe you are stuck on a subpixel?也许你被困在一个子像素上?

  • Check the colliders: Window->Analysis->Physics Debugger.检查碰撞器:Window->Analysis->Physics Debugger。
  • Check the x-coordinates of the blocks in each "tower".检查每个“塔”中块的 x 坐标。
  • Change from boxcollider to spherecollider (so you slip off of small edges?)从 boxcollider 更改为 spherecollider(所以你会从小边缘滑落?)

What about the "GroundCheck Transform"? “GroundCheck 转换”怎么样? I don't see why it's a separate transform, is it a child of the player?我不明白为什么它是一个单独的变换,它是玩家的孩子吗?

try to add a box collider to the image..尝试在图像中添加一个盒子对撞机..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM