简体   繁体   English

Unity3D 两盒碰撞器(2D)常见边框问题

[英]Unity3D two box colliders(2D) common border problem

As the image shows, two box colliders(2D) stay close together, while a circle collider(2D) fall on the common border.如图所示,两个盒子碰撞器 (2D) 靠得很近,而圆形碰撞器 (2D) 落在公共边界上。

I hope it will bounce forward (blue arrow), but sometimes it bounce back (green arrow).我希望它会向前反弹(蓝色箭头),但有时它会反弹(绿色箭头)。

I have checked the position and the width, and have make sure the box colliders(2D) are touch to each other perfectly.我已经检查了位置和宽度,并确保盒子碰撞器(2D)完美地相互接触。

(positions: (0,0), (2,0), widths: 2, 2) (位置: (0,0), (2,0), 宽度: 2, 2)

I am new on Unity, and have no idea how to prevent the strange bounce.我是 Unity 的新手,不知道如何防止奇怪的反弹。

Please give me some help, thanks.请给我一些帮助,谢谢。

Image图片

图片

Maybe It'll work if you edit the colliders like this:如果您像这样编辑对撞机,也许它会起作用:

图片

I am not quite sure what is the problem, I hope this helps.我不太确定是什么问题,我希望这会有所帮助。

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

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