I wanted to shrink a polygon, but because it's shape is like a skewed square,
I though of editing each of the 4 points to their half Y position, making them meet at the middle. For that I calculated half their scalar vectors for each point, and I have the following code so far:
onready var NormalPolygon = $Polygon2D.polygon
onready var ShrunkPolygon = 
for Point in NormalPolygon: #Returns Vector2 of each point.
var HalfwayPoint = Point / 2 #Here later will be just the Point.Y/2
var i = 0
while i < 3: #Don't know if the points starts at 0 or 1, because normally arrays starts at 0 index.
i += 1
In theory it should work, but the problem is that $Polygon2D.polygon returns a copy of the points, not a reference.
How can I edit the Polygon2D points?
I even though of using just the size, but the square looks like is getting squashed rather than shrinked.