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

Generate physics shape from source sprites #1

Open
ruccho opened this issue Jan 10, 2024 · 5 comments
Open

Generate physics shape from source sprites #1

ruccho opened this issue Jan 10, 2024 · 5 comments

Comments

@ruccho
Copy link
Owner

ruccho commented Jan 10, 2024

No description provided.

@yorube
Copy link

yorube commented Jan 16, 2024

If you are interested in images to shape from scratch this library provides some implements by C#
https://github.com/NetTopologySuite/NetTopologySuite
There is another implemented in unity.
https://github.com/sr4dev/Unity-SpriteAssist
Hope to give you some inspiration.😀

@ruccho
Copy link
Owner Author

ruccho commented Jan 17, 2024

Currently FangAutoTile divides source tile sheets into small tile segments then combines them. I think it is better to also combine sprite shapes obtained from source tile sheets because it enables users to generate/modify sprite shapes with built-in sprite editor of tile sheet.
Thank you.

@Nrosa01
Copy link

Nrosa01 commented Mar 27, 2024

What if we could get the generated spritesheet? That way we can manually tune the physics shape for each sprite while still using FangAutoTile. Currently we can just get the underlaying Texture2D. Furthermore, being able to get the spritesheet would allow to fine tune the sprites

@ruccho
Copy link
Owner Author

ruccho commented Mar 30, 2024

Sprite assets generated programmatically are not handled by the standard Texture Importer, so I guess they don't provide a UI for adjusting the shape. Simply making the generated sprite public may not solve the problem.

@Nrosa01
Copy link

Nrosa01 commented Mar 30, 2024

It might solve the problem. If the tool allows us to generate the .PNG we can then set is a multiple using the sprite editor, set the physic shape etc... The problem is that somehow that new .PNG must be linked to the fan autotile, but it should be doable. I might check source other day and see if there is an easy way of adding it

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

3 participants