Jump to content

Graphics lineTo performing weirdly when scaling down.


JakeCake
 Share

Recommended Posts

This is kind of weird. I am drawing a line on the screen using a game.add.graphics object. I need it to draw a trajectory, which is working alright till now. In my game, it is now also possible to zoom out, so to keep the line visible at all times I set the line-width to:

2.0 / game.camera.scale.x

So that it always appear 2 units wide no matter how scaled up or down the game-world is. Now this works fine, up until the scale hits about 1/150. Then parts of the line starts to disappear, it is still somewhat visible, but very hard to see. Here's a screenshot of it:

Proper, just on the edge of where weirdness happens.

yDZ71zm.png

 

And here is the problem, zoomed slightly further out.

kETz3VE.png

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...