|
@@ -78,7 +78,7 @@ These nodes allow you to draw the shape directly in the editor workspace.
|
|
the ``Node2D`` scale handles. Scaling a shape can result in unexpected
|
|
the ``Node2D`` scale handles. Scaling a shape can result in unexpected
|
|
collision behavior.
|
|
collision behavior.
|
|
|
|
|
|
-.. image:: img/player_coll_shape.png
|
|
|
|
|
|
+.. image:: img/player_coll_shape.webp
|
|
|
|
|
|
Physics process callback
|
|
Physics process callback
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
@@ -132,9 +132,9 @@ These properties can be configured via code, or by editing them in the Inspector
|
|
|
|
|
|
Keeping track of what you're using each layer for can be difficult, so you
|
|
Keeping track of what you're using each layer for can be difficult, so you
|
|
may find it useful to assign names to the layers you're using. Names can
|
|
may find it useful to assign names to the layers you're using. Names can
|
|
-be assigned in **Project Settings > Layer Names**.
|
|
|
|
|
|
+be assigned in **Project Settings > Layer Names > 2D Physics**.
|
|
|
|
|
|
-.. image:: img/physics_layer_names.png
|
|
|
|
|
|
+.. image:: img/physics_layer_names.webp
|
|
|
|
|
|
GUI example
|
|
GUI example
|
|
^^^^^^^^^^^
|
|
^^^^^^^^^^^
|
|
@@ -149,8 +149,8 @@ place each node type in its respective layer using the "Layer" property.
|
|
Then set each node's "Mask" property by selecting the layers it should
|
|
Then set each node's "Mask" property by selecting the layers it should
|
|
interact with. For example, the Player's settings would look like this:
|
|
interact with. For example, the Player's settings would look like this:
|
|
|
|
|
|
-.. image:: img/player_collision_layers.png
|
|
|
|
-.. image:: img/player_collision_mask.png
|
|
|
|
|
|
+.. image:: img/player_collision_layers.webp
|
|
|
|
+.. image:: img/player_collision_mask.webp
|
|
|
|
|
|
.. _doc_physics_introduction_collision_layer_code_example:
|
|
.. _doc_physics_introduction_collision_layer_code_example:
|
|
|
|
|