From bb62c07fce9c72066185da082e6ddd25625996bd Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 3 Dec 2019 17:09:26 +0100 Subject: [PATCH] Improve the Basis class documentation --- doc/classes/Basis.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 5a7fc0a41b6..b8fe23c2c9a 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -64,20 +64,21 @@ - Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See [method get_rotation_quat] if you need a quaternion instead. - This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1,0 or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to Godot source code. + This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the grid map editor. For further details, refer to the Godot source code. + Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. @@ -210,12 +211,16 @@ + The identity basis. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer. + The basis that will flip something along the X axis when used in a transformation. + The basis that will flip something along the Y axis when used in a transformation. + The basis that will flip something along the Z axis when used in a transformation.