+1 vote

Suppose I have a sprite. I want to be able to look at pixel data so I can derive a polygon 2d based on the sprite's shape. This just needs to be done in a single computation.

What would be the best way to approach this problem? I would think that the sprite node has to be copied over to a separate viewport, converted into a texture, and analyzed (i.e. use a convex hull algorithm over all non-transparent points), but if there's another way, let me know.

Godot version 3.3
in Engine by (30 points)

1 Answer

0 votes

The answer to your question lies here :)

by (732 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.