How do I draw a line?

Get help using Construct 2

Post » Sun Mar 16, 2014 7:37 am

What is the best approach to draw a line following the cursor / finger. (like in a painting app)?

I've tried to create a small circle every tick following your touch. But sometimes the line will be broken. (if you draw fast enough) and it probably eats too many ressources.

any ideas?
B
9
S
4
G
1
Posts: 104
Reputation: 2,278

Post » Sun Mar 16, 2014 12:48 pm

(like in a painting app)?

Have you tries Canvas plugin.
https://www.scirra.com/forum/plugin-canvas_t64239
B
34
S
9
G
3
Posts: 517
Reputation: 5,206

Post » Sun Mar 16, 2014 1:43 pm

@WizLore - you can draw a straight line by changing the width of a small sprite as the finger moves (kinda like what I did for Help the Ball), but for drawing non-straight lines, you will need to use the canvas plugin, I think.
B
33
S
7
G
8
Posts: 312
Reputation: 8,528

Post » Sun Mar 16, 2014 2:12 pm

Wow. thanks. Is this plugin compatible with most of the exporters?
B
9
S
4
G
1
Posts: 104
Reputation: 2,278


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests