Visualize Polygons using textured quads

Hello people,

I´m working with box 2d and i´m using polygon 2d to visualize the objects, but it´s a little hard to make a good texturing with this node.

My patch generates 10 polygons with random edges, for example, 2 squares, 3 triangles, and 5 pentagons.

Is there other way to do that with simple quads and a few textures (triangle, square, hexagon…)?

my idea is to use any kind of relation between the area, radio, or edges of each polygon, to control the area of the relative quads.

is this posible?

i´ve tried that but it´s a little triky.

Thanks a lot.

L

Hi
this works good for rather complex shapes so it should do the trick for regular polygons as well.
Remember not to use obtuse angles.
cheers

ps: toogle the switch to use the green outline to map exactly your textured polygons

lasal2.rar (291.6 kB)

Thanks man, but this is not that i´m looking for.
I´ve solved that using a custom rotation and scale to put the several textured quads above the polygons 2d.

Now i can use custom textures for the diferent shapes.

L