Godot: draw_arc ignores starting and end angles

Created on 19 Feb 2020  路  8Comments  路  Source: godotengine/godot

Godot v3.2.stable.official GLES3
Windows 10 x64

draw_arc function ignores starting and end angles and always draws full cirlcle.

Here is code for testing
image
Here is output
image

Example project
draw_arc_bug.zip

DxDiag
DxDiag.txt

documentation enhancement junior job

Most helpful comment

"Angle" == Radians in all cases unless otherwise specified.

We could note somewhere at least that. I don't see any mention of that aside from the tutorial (very briefly).

I don't think there's a global space to clarify this at.

CanvasItem description maybe.

All 8 comments

Are you 100% sure this takes degrees, and not radians?

image
takes radians, as expected.

The documentation doesn't mention it though.

"Angle" == Radians in all cases unless otherwise specified. (Everything that uses or produces degrees is clearly labelled as such, or has d as a suffix.) I don't think there's a global space to clarify this at. And putting it into _every single_ docstring that does this would be excessive.

"Angle" == Radians in all cases unless otherwise specified.

We could note somewhere at least that. I don't see any mention of that aside from the tutorial (very briefly).

I don't think there's a global space to clarify this at.

CanvasItem description maybe.

Except this also applies to Spatials. It's really just inherent to Godots Math functions, and thus all types.

Both CanvasItem and Spatial class descriptions, then?

Thanks a lot for answer.
It's clearly my bad to not trying radians.
Also there is mention about radians in this tutorial which I totally missed.
https://docs.godotengine.org/en/3.1/tutorials/2d/custom_drawing_in_2d.html
Sorry again.

Was this page helpful?
0 / 5 - 0 ratings