How do I Rounds Out These Drawn Lines?

0 favourites
  • 3 posts
From the Asset Store
You can change amount and speed of circles, length of lines and etc. Only 6 events.
  • Hey folks, so I'm making a prototype for a little 2D physics based puzzle game. One of the mechanics I have in place is the ability to draw lines in an MS Paint-esque fashion. However, I'm hitting some problems.

    The lines I'm drawing are all ending up pretty ugly. Jagged edges and whatnot. And when I move the mouse too fast, the lines sometimes refrain from connecting entirely.

    I've looked around the forums for a few different ways to fix this, but nothing's helped so far. I tried using the Paster plugin, but admittedly, I am at a complete loss as how to even use that plugin. Any idea how to smooth out those lines and make them look nice?

    Here's the capx. Thanks so much for any suggestions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Jagged edges are from your lines pivoting at the wrong point -- they should pivot from the end of the previous line segment, not in the middle. To solve that, move the line's origin to the left side of the image(just press 4 on the number pad). I also found that adding only 4 to the width of the new line -- instead of 15 -- greatly improved line smoothness. You'll still get gaps when moving the mouse really, really fast, but that's because your line graphic doesn't extend to the left and right edges of the canvas.

  • My friend, you are a lifesaver! Thank you so much!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)