Polygon shapes and image fills - fills aren't positioned properly?

Working on a little prototype and putting in basic “lighting”.

All I’m doing is a bunch of raycasts in a circle to get hit points and building a polygon out of them.

Ao far so good, however I then have to reposition the polygon so that it’s centred properly.

This all works fine and looks as expected.

But I want the polygon to be less solid so I’ve applied an image fill to it however the position of this image fill doesn’t seem to match the adjusted position of the polygon.

I’m terrible at explaining so I pulled out the code into a fairly ugly demo to show the issue.

https://glitch.games/demos/polyFillPosition

Just move the mouse around and you’ll see that when you’re no where near a ‘wall’ the circle is fine, however when you get closer to things the underlying polygon needs to be offset to match where it should be however the fill doesn’t match so the brightspot/centre is off.

If you press ‘f’ you can toggle the fill so you can see what it looks like as a pure polygon and see that the actual polygon is correctly positioned.

If you tap ‘d’ you can see the raycasts I’m using to build the polygon ( tapping ‘p’ will hide the actual poly so it’s easier to see the casts )

And finally tapping ‘c’ will disable the position adjustment I need to do that aligns the polygon properly.

The demo source can be downloaded here https://www.glitch.games/demos/polyFillPosition/polyFillPosition.zip

I’m not sure if this is a bug with Solar, bad maths on my part, or something else I’m missing?