Document limitations of negative scales in 2D and 3D

(cherry picked from commit 3398fb77a915d3f6d7a3dc6bf2398840c696365b)
This commit is contained in:
Aaron Franke 2022-06-10 00:56:35 -05:00 committed by Relintai
parent ff08a26689
commit 5ce7851cfd
3 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,7 @@
</member> </member>
<member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )">
The node's scale. Unscaled value: [code](1, 1)[/code]. The node's scale. Unscaled value: [code](1, 1)[/code].
[b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
</member> </member>
<member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform">
Local [Transform2D]. Local [Transform2D].

View File

@ -265,6 +265,7 @@
</member> </member>
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )"> <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )">
Scale part of the local transformation. Scale part of the local transformation.
[b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
</member> </member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
Local space [Transform] of this node, with respect to the parent node. Local space [Transform] of this node, with respect to the parent node.

View File

@ -117,6 +117,7 @@
<argument index="0" name="scale" type="Vector2" /> <argument index="0" name="scale" type="Vector2" />
<description> <description>
Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication. Returns a copy of the transform scaled by the given [code]scale[/code] factor, using matrix multiplication.
[b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed.
</description> </description>
</method> </method>
<method name="translated"> <method name="translated">