mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Fix typos found using codespell -wi3 ^classes/**/*.rst
This commit is contained in:
@@ -506,7 +506,7 @@ important guidelines to follow.
|
||||
First, you should always be using the default editor theme and text when taking
|
||||
screenshots.
|
||||
|
||||
To improve the apperance of 3D screenshots, use 4× MSAA, enable anisotropic
|
||||
To improve the appearance of 3D screenshots, use 4× MSAA, enable anisotropic
|
||||
filtering on the project's textures, and set the anisotropic filter quality to
|
||||
16× in Project Settings.
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Cross-language scripting
|
||||
|
||||
Godot allows you to mix and match scripting languages to suit your needs.
|
||||
This means a single project can define nodes in both C# and GDScript.
|
||||
This page will go through the possible interactions between two nodes writen
|
||||
This page will go through the possible interactions between two nodes written
|
||||
in different languages.
|
||||
|
||||
The following two scripts will be used as references throughout this page.
|
||||
@@ -104,7 +104,7 @@ be instantiated with :ref:`GDScript.New() <class_GDScript_method_new>`.
|
||||
GDScript MyGDScript = (GDScript) GD.Load("res://path_to_gd_file.gd");
|
||||
Object myGDScriptNode = (Godot.Object) MyGDScript.New(); // This is a Godot.Object
|
||||
|
||||
Here we are using an :ref:`class_Object` but you can use type convertion like
|
||||
Here we are using an :ref:`class_Object` but you can use type conversion like
|
||||
explained in :ref:`doc_c_sharp_features_type_conversion_and_casting`.
|
||||
|
||||
Accessing fields
|
||||
|
||||
@@ -83,11 +83,11 @@ Example:
|
||||
var x = int(Input.is_action_pressed("ui_right")) - int(Input.is_action_pressed("ui_left"))
|
||||
var y = int(Input.is_action_pressed("ui_down")) - int(Input.is_action_pressed("ui_up"))
|
||||
|
||||
# the ouputs array is used to set the data of the output ports
|
||||
# the outputs array is used to set the data of the output ports
|
||||
|
||||
outputs[0] = Vector2(x,y)
|
||||
|
||||
# return the error string if an error occured, else the id of the next sequence port
|
||||
# return the error string if an error occurred, else the id of the next sequence port
|
||||
return 0
|
||||
|
||||
Using a custom node
|
||||
|
||||
@@ -163,7 +163,7 @@ linked from one to the next. As you can imagine, the more points your shape is m
|
||||
the smoother it will appear, but the heavier it will also be in terms of processing cost. In general,
|
||||
if your shape is huge (or in 3D, close to the camera), it will require more points to be drawn without
|
||||
it being angular-looking. On the contrary, if your shape is small (or in 3D, far from the camera),
|
||||
you may decrease its number of points to save processing costs; this is known as *Level of Detail (LoD)*.
|
||||
you may decrease its number of points to save processing costs; this is known as *Level of Detail (LOD)*.
|
||||
In our example, we will simply use a fixed number of points, no matter the radius.
|
||||
|
||||
.. tabs::
|
||||
|
||||
@@ -124,12 +124,12 @@ When we do this, we get the desired result of rotating the object:
|
||||
|
||||
.. image:: img/matrices_and_transforms/rotate1.png
|
||||
|
||||
If you have trouble understanding the above, try this excercise:
|
||||
If you have trouble understanding the above, try this exercise:
|
||||
Cut a square of paper, draw X and Y vectors on top of it, place
|
||||
it on graph paper, then rotate it and note the endpoints.
|
||||
|
||||
To perform rotation in code, we need to be able to calculate
|
||||
the values programatically. This image shows the formulas needed
|
||||
the values programmatically. This image shows the formulas needed
|
||||
to calculate the transformation matrix from a rotation angle.
|
||||
Don't worry if this part seems complicated, I promise it's the
|
||||
hardest thing you need to know.
|
||||
|
||||
@@ -178,7 +178,7 @@ for the Spatial nodes we want to target.
|
||||
else:
|
||||
return null
|
||||
|
||||
This way all the gizmo logic and drawing methods can be implemented in a new clas extending
|
||||
This way all the gizmo logic and drawing methods can be implemented in a new class extending
|
||||
:ref:`EditorSpatialGizmo<class_EditorSpatialGizmo>`, like so:
|
||||
|
||||
::
|
||||
|
||||
@@ -294,7 +294,7 @@ Global constants are useful when you want to have access to a value throughout y
|
||||
Structs
|
||||
-------
|
||||
|
||||
Structs are compound types which can be used for better abstaction of shader code. You can declare them at the global scope like:
|
||||
Structs are compound types which can be used for better abstraction of shader code. You can declare them at the global scope like:
|
||||
|
||||
.. code-block:: glsl
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ is not on any collision layers, and is instead only on a single collision mask.
|
||||
We are going to use the ``Damage_Body`` :ref:`KinematicBody <class_KinematicBody>` node to detect the collision point and normal when the sword collides with something in the scene.
|
||||
|
||||
.. tip:: While this is perhaps not the best way of getting the collision information from a performance point of view, it does give us a lot of information we can use for post-processing!
|
||||
Using a :ref:`KinematicBody <class_KinematicBody>` this way means we can detect exactly where ths sword collided with other :ref:`PhysicsBody <class_PhysicsBody>` nodes.
|
||||
Using a :ref:`KinematicBody <class_KinematicBody>` this way means we can detect exactly where the sword collided with other :ref:`PhysicsBody <class_PhysicsBody>` nodes.
|
||||
|
||||
That is really the only thing note worthy about the sword scene. Select the ``Sword`` :ref:`RigidBody <class_RigidBody>` node and make a new script called ``Sword.gd``.
|
||||
Add the following code:
|
||||
|
||||
Reference in New Issue
Block a user