# "top" tiles

Get help using Construct 2

### » Sat Nov 28, 2015 7:34 am

Hello all,

I'm wondering whether there is a way to generate "top tiles" (i.e the floor) on tiles that aren't squares, but smooth and curved (irregular shapes). Has anyone tried this? Is there a way to determine when an object ends and spawn an overlay at it's end point?
B
78
S
46
G
25
Posts: 386
Reputation: 19,699

### » Sat Nov 28, 2015 7:56 am

I don't understand the question. Can you make a diagram?
Best I can tell you want to put tiles on top of an irregular shape? What would that look like?

Also what do you mean by an object ends? Do you mean it gets destroyed?
B
97
S
36
G
131
Posts: 5,519
Reputation: 83,476

### » Sat Nov 28, 2015 8:11 am

I'm sorry to be unclear. Here is an quick sketch:

By "object ends" I mean, the edge of an irregular shape.
B
78
S
46
G
25
Posts: 386
Reputation: 19,699

### » Sat Nov 28, 2015 8:46 am

Ah ok that makes sense.
Basically you want to put objects around the edge of the object and want the objects to be angled in the direction of the edge.

There isn't a way to access the collision polygon. A way to approximate it could be to create a ring of objects around the ground then move them toward the ground's center until they collide with the ground. At that point the object's will be shrink wrapped around the ground. You could then find the angle of the edge by using the angle expression between two adjacent points.
There are probably other ways to detect the edge. One could be to position invisible rotated rectangles around the shape in the editor to define the edge. You could also use the paster object to draw a Sprite in a warped way around the shape.

Unless you're drawing the ground at runtime it's probably better to position the objects in the editor. I believe Sqiddster did that in Airscape.
B
97
S
36
G
131
Posts: 5,519
Reputation: 83,476

### » Sat Nov 28, 2015 8:50 am

B
78
S
46
G
25
Posts: 386
Reputation: 19,699

### » Sat Nov 28, 2015 6:56 pm

Here's an experiment with some ideas.
https://dl.dropboxusercontent.com/u/542 ... grass.capx
B
97
S
36
G
131
Posts: 5,519
Reputation: 83,476

### » Sun Nov 29, 2015 12:58 am

Holy smokes, that's incredibly kind of you . Thanks!
B
78
S
46
G
25
Posts: 386
Reputation: 19,699