|
@@ -235,7 +235,7 @@ Putting it all together
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
We're going to apply everything we mentioned so far onto one transform.
|
|
We're going to apply everything we mentioned so far onto one transform.
|
|
-To follow along, create a simple project with a Sprite node and use the
|
|
|
|
|
|
+To follow along, create a simple project with a Sprite node and use the
|
|
Godot logo for the texture resource.
|
|
Godot logo for the texture resource.
|
|
|
|
|
|
Let's set the translation to (350, 150), rotate by -0.5 rad, and scale by 3.
|
|
Let's set the translation to (350, 150), rotate by -0.5 rad, and scale by 3.
|
|
@@ -284,13 +284,15 @@ Shearing the transformation matrix (advanced)
|
|
explores an uncommonly used aspect of transformation matrices
|
|
explores an uncommonly used aspect of transformation matrices
|
|
for the purpose of building an understanding of them.
|
|
for the purpose of building an understanding of them.
|
|
|
|
|
|
|
|
+ Node2D provides a shearing property out of the box.
|
|
|
|
+
|
|
You may have noticed that a transform has more degrees of freedom than
|
|
You may have noticed that a transform has more degrees of freedom than
|
|
the combination of the above actions. The basis of a 2D transformation
|
|
the combination of the above actions. The basis of a 2D transformation
|
|
matrix has four total numbers in two :ref:`class_Vector2` values, while
|
|
matrix has four total numbers in two :ref:`class_Vector2` values, while
|
|
a rotation value and a Vector2 for scale only has 3 numbers. The high-level
|
|
a rotation value and a Vector2 for scale only has 3 numbers. The high-level
|
|
concept for the missing degree of freedom is called *shearing*.
|
|
concept for the missing degree of freedom is called *shearing*.
|
|
|
|
|
|
-Normally you will always have the basis vectors perpendicular to each
|
|
|
|
|
|
+Normally, you will always have the basis vectors perpendicular to each
|
|
other. However, shearing can be useful in some situations, and
|
|
other. However, shearing can be useful in some situations, and
|
|
understanding shearing helps you understand how transforms work.
|
|
understanding shearing helps you understand how transforms work.
|
|
|
|
|