How do I draw a line?

Get help using Construct 2

Post » Sun Apr 05, 2015 7:11 pm

Hello, sorry for my English.
I'm doing a laser and I need to draw a line from point x0, y0 to y1 and x1 can not find object to this.
as I can do?
thanks in advance.
B
6
S
1
Posts: 15
Reputation: 422

Post » Sun Apr 05, 2015 7:25 pm

You can do it with a sprite that has a hotspot at it's left. Then you can position it to (x0,y0), set it's angle toward (x1,y1) and set it's width to distance(x0,y0,x1,y1). The height of the sprite is the thickness of the line.

An example that does this is here:
viewtopic.php?f=147&t=106252&p=787104&hilit=draw+line#p787104

Another idea is to use the canvas plugin which has an action to draw a line.
B
92
S
32
G
107
Posts: 5,280
Reputation: 69,971

Post » Tue Apr 07, 2015 5:00 am

thx. i´m try this
B
6
S
1
Posts: 15
Reputation: 422


Return to How do I....?

Who is online

Users browsing this forum: David181 and 25 guests