mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 17:28:58 +00:00
Fix some forgotten lowercase x/y/z
This commit is contained in:
@@ -85,8 +85,8 @@ To do this in code, we multiply each of the vectors:
|
||||
|
||||
Transform2D t = Transform2D.Identity;
|
||||
// Scale
|
||||
t.x *= 2;
|
||||
t.y *= 2;
|
||||
t.X *= 2;
|
||||
t.Y *= 2;
|
||||
Transform = t; // Change the node's transform to what we calculated.
|
||||
|
||||
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;
|
||||
// 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.
|
||||
|
||||
.. note:: You can't set the raw values of a Transform2D in the editor,
|
||||
|
||||
@@ -189,9 +189,9 @@ degrees to either side:
|
||||
// Calculate vector from `a` to `b`.
|
||||
var dvec = pointA.DirectionTo(pointB);
|
||||
// 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):
|
||||
// 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
|
||||
point_b will work, as they are in the same plane:
|
||||
|
||||
Reference in New Issue
Block a user