(I'm not sure why, but this post was stuck in the moderation queue. Seems like everything is in order though, so I think the forums software accidentally flagged it or something.)
If I had to guess, the issue is probably related to the -10
and 522
offsets, which is skewing the polygon just enough to cause the issue. Maybe change vertex position 3 to (522, 128)
and see if that fixes it? It could be the difference between the second and third vertex on the X coordinate is giving the skewed perspective.
If that does not work, then maybe try using (0, 0)
(512, 0)
(512, 128)
and (0, 128)
as positions and see if that fixes it? I don't know if that would help, but it might be worth a try.
Outside of that I do not know right off, I haven't really used the Polygon2D node very much in Godot. Regardless, hopefully this is of some help!
(Side note: Welcome to the forums!)