How to use the AtlasTexture2D with Polygon2D

Godot Version

4.2.1

Question

I am using the AnimatedSprite2D to get an animation out of a AnimationFrames Resource. This resource is using a TextureAtlas. I want to make an animatable object that uses Skeleton2D node(only works with Polygon2D node).

So, I am taking an animation out of the TextureAtlas and putting it in the Polygon2D node. And now I am confused as to how it should work.

The texture atlas looks like this:

For a Polygon2D node with texture, normally, I would go in the Sprite Editor and draw out the boundaries, like this:

Problem happens when I go to the Polygons tab, it doesn’t seem to follow the uv’s I set:

Similar in game it’s rendered like that:

image

1 Like

I’m having the same issue.
(In my case, I imported my textures via TexturePacker and had a plugin generate the texture atlas for me, but the end result is the same.)

Did you find a solution to the issue?

Nope, just gave up on this for now.

Ah, that’s unfortunate.
Thanks for the quick response though!

Looking back at this, probably it could be solved with a shader. I guess thats how the shader does it probably. Eg. attach a shader to the polygon, read input from the texture atlas and change the uv to show the correct one.