well im not sure if it works but i tough about how to make godot detect that what i draw is a circle or not, using the angle between two points.
this is my draw:
i thought if i get the every angle between between closest points, and if any of them are not
90 degree or close to
90 degree, its means that angle is smoot, like this:
and in the end what we have will be a circle, at least that what i thought.
is this doable?
i mean i did try few things with
but cant reach the points one by one, or add them to an array so that i can reach them from there, but couldn't do that to. And i couldn't found any example or tutorial on the net either.
so here i am, is this doable? or are there a diffrent way to make godot detect that what draw is, a circle ?
this is how i draw,
var touch_position = Vector2()
var current_touch = Vector2()
if event is InputEventScreenTouch and event.is_pressed():
touch_position = event.get_position()
if event is InputEventScreenTouch and not event.is_pressed():
if event is InputEventScreenDrag:
current_touch = event.get_position()
if event is InputEventScreenDrag and not event.is_pressed():
current_touch = null
point_draw = current_touch
if $draw_line.points.size() > 70:
and this are nodes: