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

colkind uses BBoxMode #12

Open
ithinkandicode opened this issue May 30, 2020 · 0 comments · May be fixed by #13
Open

colkind uses BBoxMode #12

ithinkandicode opened this issue May 30, 2020 · 0 comments · May be fixed by #13

Comments

@ithinkandicode
Copy link
Contributor

ithinkandicode commented May 30, 2020

Atm colkind uses BBoxMode, so sprites like this:

swing-1-rectangle

Are exported like this:

swing-2-ellipses

In this example, because the BBoxMode is 2, colkind is also set to 2

Precise   - <colkind>0</colkind>
Rectangle - <colkind>1</colkind>
Ellipse   - <colkind>2</colkind>
Diamond   - <colkind>3</colkind>

Not sure how to fix this as UMT can't tell what the mask shape is

But it does know if the sprite uses a separate collision mask (values here), so:

  • if sprite.SepMasks == 1 (Precise), <colkind> = 0
  • if sprite.SepMasks == 0 (AxisAlignedRect ie. Rectangle), <colkind> = 1

It's not perfect as Precise is also used for Ellipses and Diamond. But we know at least when Rectangle is being used, and Precise is probably a safe default in any other case.

ithinkandicode added a commit to ithinkandicode/UndertaleModTool-ExportToProjectScript that referenced this issue May 30, 2020
@ithinkandicode ithinkandicode linked a pull request May 30, 2020 that will close this issue
ithinkandicode added a commit to ithinkandicode/UndertaleModTool-ExportToProjectScript that referenced this issue May 30, 2020
ithinkandicode added a commit to ithinkandicode/UndertaleModTool-ExportToProjectScript that referenced this issue May 30, 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

Successfully merging a pull request may close this issue.

1 participant