From bb753aaf17abd32031e9a936475481a32bcd700e Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 17 Apr 2020 15:25:55 +0200 Subject: [PATCH] Clarify that angles must be specified as radians in the documentation This closes #36356. (cherry picked from commit cae5260dab0d6c8d705218ea1f44aeef4cbd17fb) --- doc/classes/CanvasItem.xml | 1 + doc/classes/Spatial.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 37002772f13..97e6f02907a 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -9,6 +9,7 @@ Canvas items are drawn in tree order. By default, children are on top of their parents so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis. A [CanvasItem] can also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode. Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed. + [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index 0f713c429e8..01a2c6060b6 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -6,6 +6,7 @@ Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use [Spatial] as a parent node to move, scale, rotate and show/hide children in a 3D project. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Spatial] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Spatial]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Spatial] object itself is referred to as object-local coordinate system. + [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html