mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 18:29:11 +00:00
Merge pull request #1438 from mani144/patch-1
fixing Arc polygon function example for GDScript
This commit is contained in:
committed by
mhilbrunner
parent
2060ee6ada
commit
7ba063097c
@@ -246,7 +246,7 @@ We can take this a step further and not only write a function that draws the pla
|
||||
var colors = PoolColorArray([color])
|
||||
|
||||
for i in range(nb_points+1):
|
||||
var angle_point = deg2rad(angle_from + i * (angle_to - angle_from) / nb_points - 90
|
||||
var angle_point = deg2rad(angle_from + i * (angle_to - angle_from) / nb_points - 90)
|
||||
points_arc.push_back(center + Vector2(cos(angle_point), sin(angle_point)) * radius)
|
||||
draw_polygon(points_arc, colors)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user