[!fig|left|snail]- ![[snail.png|Snail Facts!|200]] Snails are cool! Click to learn more!
- Snails r cute :3
- They be eating leaf
- Swirly soft-boi chomkers :3333
Read-more [[Le Smail Manifesto|here]]!
[!fig|right|px] ![[meloonics_64.png|64]] It me!
[!fig|left|snail]- ![[snail.png|Snail Facts!|200]] Snails are cool! Click to learn more!
- Snails r cute :3
- They be eating leaf
- Swirly soft-boi chomkers :3333
Read-more [[Le Smail Manifesto|here]]!
[!fig|right|px] ![[meloonics_64.png|64]] It me!
| ####################################################################################### | |
| # ~~~~~~~~ Polygon-Snapping Area2D - written by meloonics in Godot 3.4, 2022 ~~~~~~~~ # | |
| # HOW TO USE: # | |
| # 1. Make a scene which has Area2D as root and a CollisionPolygon2D as child. # | |
| # Call it whatever, but don't rename the CollisionPolygon2D. # | |
| # 2. Attach this script to the root. # | |
| # 3. Add the scene as child to either Polygon2D or CollisionPolygon2D. Won't work otherwise, no idea why you think it would smh my head | |
| # 4. Adjust offset, distance and thickness to your liking. # | |
| # The CollisionShape of the Area2D should update automatically. # | |
| # 5. Don't overdo it with the thickness in concave shapes, or the polygon will break # |
| extends Node | |
| var cas : float | |
| var bcs : float | |
| var brad : float | |
| var crad : float | |
| var contrastedB : bool = false | |
| var contrastedC : bool = false | |
| var indieB : bool = false |