Merge pull request #61877 from aaronfranke/doc-negative-scale

This commit is contained in:
Rémi Verschelde 2022-06-16 09:59:30 +02:00 committed by GitHub
commit 296bbe2483
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,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="skew" type="float" setter="set_skew" getter="get_skew" default="0.0"> <member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0">
</member> </member>

View File

@ -302,6 +302,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="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space.

View File

@ -163,6 +163,7 @@
<argument index="0" name="scale" type="Vector2" /> <argument index="0" name="scale" type="Vector2" />
<description> <description>
Sets the transform's scale. Sets the transform's scale.
[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="set_skew"> <method name="set_skew">