Hı there,
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 angle_to_point
or $node.get_angle_to
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,
extends Node2D
var touch_position = Vector2()
var current_touch = Vector2()
var point_draw
func _input(event):
if event is InputEventScreenTouch and event.is_pressed():
touch_position = event.get_position()
if event is InputEventScreenTouch and not event.is_pressed():
$line_delete_timer.start()
if event is InputEventScreenDrag:
current_touch = event.get_position()
if event is InputEventScreenDrag and not event.is_pressed():
yield(get_tree().create_timer(0.25),"timeout")
current_touch = null
func _process(delta):
if current_touch:
print (current_touch)
point_draw = current_touch
$draw_line.add_point(point_draw)
if $draw_line.points.size() > 70:
$draw_line.remove_point(0)
func _on_line_delete_timer_timeout():
$draw_line.clear_points()
$line_delete_timer.stop()
and this are nodes:
