Collider2D碰撞检测异常-Rotating sprite does not rotate collider[Unity]





Rotating 2D colliders in the X/Y axes is not supported. By this I mean that all 2D colliders ignore transform X/Y rotation and only use Z. This is especially important when you consider that we're limited in what deformation we can achieve via Box2D for some collider types such as the Circle collider. Allowing this kind of arbitrary transform would mean Box2D would need to support ellipse (even sheered ones) which it doesn't support.

This only parts of the transform component that are used are:

X/Y position (Z ignored)
Z rotation (X/Y ignored)
X/Y scale (Z ignored)

The colliders are not part of the SpriteRenderer component so whatever it does or doesn't use isn't tied into any of the colliders.


已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页