"top" tiles

Get help using Construct 2

Post » 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
43
S
27
G
22
Posts: 309
Reputation: 15,270

Post » 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
87
S
29
G
88
Posts: 5,100
Reputation: 59,686

Post » Sat Nov 28, 2015 8:11 am

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

Image

By "object ends" I mean, the edge of an irregular shape.
B
43
S
27
G
22
Posts: 309
Reputation: 15,270

Post » 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
87
S
29
G
88
Posts: 5,100
Reputation: 59,686

Post » Sat Nov 28, 2015 8:50 am

Super helpful reply :). Thanks @R0j0hound
B
43
S
27
G
22
Posts: 309
Reputation: 15,270

Post » Sat Nov 28, 2015 6:56 pm

Here's an experiment with some ideas.
https://dl.dropboxusercontent.com/u/542 ... grass.capx
B
87
S
29
G
88
Posts: 5,100
Reputation: 59,686

Post » Sun Nov 29, 2015 12:58 am

Holy smokes, that's incredibly kind of you :). Thanks!
B
43
S
27
G
22
Posts: 309
Reputation: 15,270


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests