Browse Source

Fix some forgotten lowercase x/y/z

Paul Joannon 1 year ago
parent
commit
a60ab49aac

+ 1 - 1
getting_started/first_3d_game/09.adding_animations.rst

@@ -459,7 +459,7 @@ Here's the *Player* script.
             // Jumping.
             // Jumping.
             if (IsOnFloor() && Input.IsActionJustPressed("jump"))
             if (IsOnFloor() && Input.IsActionJustPressed("jump"))
             {
             {
-                _targetVelocity.y += JumpImpulse;
+                _targetVelocity.Y += JumpImpulse;
             }
             }
 
 
             // Iterate through all collisions that occurred this frame.
             // Iterate through all collisions that occurred this frame.

+ 4 - 0
tutorials/3d/using_transforms.rst

@@ -158,13 +158,17 @@ It is possible to rotate a transform, either by multiplying its basis by another
 
 
  .. code-tab:: csharp
  .. code-tab:: csharp
 
 
+    Transform3D transform = Transform;
     Vector3 axis = new Vector3(1, 0, 0); // Or Vector3.Right
     Vector3 axis = new Vector3(1, 0, 0); // Or Vector3.Right
     float rotationAmount = 0.1f;
     float rotationAmount = 0.1f;
+
     // Rotate the transform around the X axis by 0.1 radians.
     // Rotate the transform around the X axis by 0.1 radians.
     transform.Basis = new Basis(axis, rotationAmount) * transform.Basis;
     transform.Basis = new Basis(axis, rotationAmount) * transform.Basis;
     // shortened
     // shortened
     transform.Basis = transform.Basis.Rotated(axis, rotationAmount);
     transform.Basis = transform.Basis.Rotated(axis, rotationAmount);
 
 
+    Transform = transform;
+
 A method in Node3D simplifies this:
 A method in Node3D simplifies this:
 
 
 .. tabs::
 .. tabs::

+ 3 - 3
tutorials/math/matrices_and_transforms.rst

@@ -85,8 +85,8 @@ To do this in code, we multiply each of the vectors:
 
 
     Transform2D t = Transform2D.Identity;
     Transform2D t = Transform2D.Identity;
     // Scale
     // Scale
-    t.x *= 2;
-    t.y *= 2;
+    t.X *= 2;
+    t.Y *= 2;
     Transform = t; // Change the node's transform to what we calculated.
     Transform = t; // Change the node's transform to what we calculated.
 
 
 If we wanted to return it to its original scale, we can multiply
 If we wanted to return it to its original scale, we can multiply
@@ -324,7 +324,7 @@ As an example, let's set Y to (1, 1):
 
 
     Transform2D t = Transform2D.Identity;
     Transform2D t = Transform2D.Identity;
     // Shear by setting Y to (1, 1)
     // Shear by setting Y to (1, 1)
-    t.y = Vector2.One;
+    t.Y = Vector2.One;
     Transform = t; // Change the node's transform to what we calculated.
     Transform = t; // Change the node's transform to what we calculated.
 
 
 .. note:: You can't set the raw values of a Transform2D in the editor,
 .. note:: You can't set the raw values of a Transform2D in the editor,

+ 2 - 2
tutorials/math/vectors_advanced.rst

@@ -189,9 +189,9 @@ degrees to either side:
     // Calculate vector from `a` to `b`.
     // Calculate vector from `a` to `b`.
     var dvec = pointA.DirectionTo(pointB);
     var dvec = pointA.DirectionTo(pointB);
     // Rotate 90 degrees.
     // Rotate 90 degrees.
-    var normal = new Vector2(dvec.y, -dvec.x);
+    var normal = new Vector2(dvec.Y, -dvec.X);
     // Alternatively (depending the desired side of the normal):
     // Alternatively (depending the desired side of the normal):
-    // var normal = new Vector2(-dvec.y, dvec.x);
+    // var normal = new Vector2(-dvec.Y, dvec.X);
 
 
 The rest is the same as the previous example. Either point_a or
 The rest is the same as the previous example. Either point_a or
 point_b will work, as they are in the same plane:
 point_b will work, as they are in the same plane:

+ 4 - 4
tutorials/ui/size_and_anchors.rst

@@ -93,10 +93,10 @@ a TextureRect can be centered in its parent:
 
 
     var textureSize = rect.Texture.GetSize();
     var textureSize = rect.Texture.GetSize();
 
 
-    rect.OffsetLeft = -textureSize.x / 2;
-    rect.OffsetRight = textureSize.x / 2;
-    rect.OffsetTop = -textureSize.y / 2;
-    rect.OffsetBottom = textureSize.y / 2;
+    rect.OffsetLeft = -textureSize.X / 2;
+    rect.OffsetRight = textureSize.X / 2;
+    rect.OffsetTop = -textureSize.Y / 2;
+    rect.OffsetBottom = textureSize.Y / 2;
     AddChild(rect);
     AddChild(rect);
 
 
 Setting each anchor to 0.5 moves the reference point for the margins to
 Setting each anchor to 0.5 moves the reference point for the margins to