arypbatista / godot-bordered-polygon-2d

Polygon2D with textured borders
MIT License
61 stars 9 forks source link

Smooth level, an option to avoid sharp borders #1

Closed arypbatista closed 7 years ago

arypbatista commented 7 years ago

Right now borders copy polygon's charcteristics. This leads to sharp corners. We want to smooth them by generating extra polygons around the corners.

jtaart commented 7 years ago

I'll try to make this tonight.

jtaart commented 7 years ago

WIP:

arypbatista commented 7 years ago

This actually works really good but I think we have some issues with twisted borders. I have added a debug example for testing this.

How do you think we should proceed @jtaart? Maybe we can fusion the points that originates the twist

jtaart commented 7 years ago

The twisting happens when a shape gets pushed to small, and the points of each side pass each other. This happens the most when overlapping is turned up. I have an idea how to fix it, but not sure if it will work.