# How do I make a polygon dynamic?

Get help using Construct 2

### » Tue Dec 08, 2015 5:45 pm

Hi to all. First of all Thanks for this fantastic Engine Programm. Construct2 is the best engine for a game developer!

I'm having some problem during the creation of a graph like the one in picture https://www.dropbox.com/s/80qo4kloef76q ... 1.png?dl=0 .
I have some variables x, y and I need to show if a Points is inside or outside the polygon graph. The Points 1,2 and 3 are dynamic and taked from input box. I tried canvas, polygon but the coordinates are different for cartesian and construct2 and the graph it's impossibile to show in correct way. How can I do a dynamic graph? it's possibile? I searched around the forum, but no solution! sorry for my bad English...
B
3
Posts: 3
Reputation: 206

### » Tue Dec 08, 2015 8:51 pm

You can use a TiledBackground of 1x1 with the appropriate colour. Then just size the object to whatever size you want.
B
71
S
22
G
281
Posts: 3,842
Reputation: 154,886

### » Tue Dec 08, 2015 10:26 pm

thanks, but for me the problem is how? Resize using the x,y of construct is different thant the cartesian x,y because if y is highter the vertice is showed down instead to the top. For example vertice 1 (100,250) is higher than (100, 350) and should be the contrary.
B
3
Posts: 3
Reputation: 206

### » Tue Dec 08, 2015 11:15 pm

Just basic math. Subtract the LayoutHeight + Self.Height from your Y, assuming your Layout is the size of your graph.
B
71
S
22
G
281
Posts: 3,842
Reputation: 154,886

I love you!!!!

Is working
B
3
Posts: 3
Reputation: 206