Slow down canvas draw

0 favourites
  • 3 posts
From the Asset Store
Pixel Destruction like in "Worms" (Drawing Canvas based)
  • Hi all,

    I'm using the Canvas pluin to draw lines in reaction to Key/Mouse clicks. E.g. On click > draw curve etc.

    Though for my idea I would like the lines to draw more slowly (at a speed which I control in the project).

    Can anyone help me work out how to slowly draw a line using the Canvas plugin? At the moment the lines appear instantly.

    Help would be appreciated as I cant seem to find a solution on the forums. I looked at other ways of drawing lines, i.e. using bullet behavour and spawning a trial behind it. But this approach won't give control over the line angle/line type.

    Many thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Apologies for bumping...

    Can anyone help to point me in the right direction?

    To clarify my issue. I need to draw lines (like they are being drawn across the screen by a pen).

    I've tried using sine and ease tween behaviour (which does do what I want) to repeat sprites across the screen, I've also used the canvas plugin, which again does draw the lines I want.

    However with the sine/eas tween combination I can't get it to draw smooth lines. With canvas the lines appear instantly.

    So I guess there are two questions:

    Any suggestions on how to draw a smooth, unstepped line when using ease tween. I'm tweening a small sprite, then spawning sprites from it on every tick.

    Is there any other way to draw lines on screen other than the above or with the canvas plugin?

    Any help is massively appreciated!

  • Ok, I was over-thinking this one I reckon. Sorted now, using the "Easetween/Sine" combination and using a much larger sprite, with an origin point set a little way inside the bounding box, to "draw" with has done the trick and created a smooth line...

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