I am working on a low-fi pixel platformer with grapple hook mechanic and I am trying to draw the rope of the grappling hook. I want the line to be 1px. Currently I am using a Line2D node for it, but I am having issues with the line rendering
As seen above, the line is shifting weight and is "breaking" at certain angles. I thought maybe the line drawing is not in sync with the rest of drawing. I have tried putting changes to the line inside physicsprocess() in hopes it will sync the rendering, and while it seems to improve it a little, it doesn't solve the problem - the line still changes width, breaks and now flickers (goes invisible on some frames)!
Then I thought it might be the fault of the camera, but disabling camera makes it even worse - the line is only visible only during the frames when it is perfectly straight.
I have also tried making the line wider by a decimal (width of 1.1 to 1.9). It makes the rope stay visible for sure, but it definitely makes the rope thicker (more segments are 2px than 1px, less so with something 1.1 but still the rope as a whole is thicker than 1pixel), and it still jiggles and flickers.
Now my thinking is that Line2D maybe is not meant to be used at runtime to generate graphics. Maybe there is another approach I am missing? Or is this a bug in the engine? I mean, it should be an easy task to draw a 1px line at any angle, but I am at my wits end.
I am open to any suggestions, either using Line2D or any other approach.
Just in case my settings can help / are relevant:
Use Nvidia Flicker workaround checked
Pixel snap checked (this is needed for my game, disabling it helps, but the line still flickers and jiggles on top of other unwanted tileset behavior)