Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用@pivot导致unity生成的碰撞盒位置与在aseprite画的位置不一致 #11

Open
NocNophthyon opened this issue May 14, 2020 · 0 comments
Assignees

Comments

@NocNophthyon
Copy link

在aseprite中画的碰撞盒位置:
QQ图片20200514105733

未使用@pivot时unity生成的碰撞盒位置:
QQ图片20200514105758

使用@pivot时unity生成的碰撞盒位置:
QQ截图20200514105937

导入设置:
QQ截图20200514110028

看了源码,初步认为是MetaLayerBoxCollider代码中
var pivot = Vector2.Scale(ctx.settings.PivotRelativePos, new Vector2(ctx.file.width, ctx.file.height));
的PivotRelativePos值是customPivot的值,而不是MetaLayerPivot最后生成的Pivot的值。但我对程序基本一窍不通,不知道分析的是否正确。

@WeAthFoLD WeAthFoLD self-assigned this Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants