فهرست منبع

Clarify Area2D warning behavior (#10173)

* Clarify Area2D warning behavior

* Apply suggestions from code review

---------

Co-authored-by: tetrapod <[email protected]>
Kushal K S 8 ماه پیش
والد
کامیت
032be9e338
2فایلهای تغییر یافته به همراه13 افزوده شده و 2 حذف شده
  1. 13 2
      getting_started/first_2d_game/02.player_scene.rst
  2. BIN
      getting_started/first_2d_game/img/no_shape_warning.webp

+ 13 - 2
getting_started/first_2d_game/02.player_scene.rst

@@ -20,8 +20,16 @@ what the object *is*. Click the "Other Node" button and add an :ref:`Area2D
 
 
 .. image:: img/add_node.webp
 .. image:: img/add_node.webp
 
 
-Godot will display a warning icon next to the node in the scene tree. You can
-ignore it for now. We will address it later.
+When you add the ``Area2D`` node, Godot will display the following **warning icon** 
+next to it in the scene tree:
+
+.. image:: img/no_shape_warning.webp
+
+This warning tells us that the ``Area2D`` node requires a shape to detect collisions or overlaps. 
+We can **ignore the warning temporarily** because we will first set up the player's visuals 
+(using an animated sprite). Once the visuals are ready, we will add a collision shape as a child 
+node. This will allow us to accurately size and position the shape based on the sprite’s appearance.
+
 
 
 With ``Area2D`` we can detect objects that overlap or run into the player.
 With ``Area2D`` we can detect objects that overlap or run into the player.
 Change the node's name to ``Player`` by double-clicking on it. Now that we've
 Change the node's name to ``Player`` by double-clicking on it. Now that we've
@@ -98,6 +106,9 @@ When you're finished, your ``Player`` scene should look like this:
 
 
 .. image:: img/player_scene_nodes.webp
 .. image:: img/player_scene_nodes.webp
 
 
+Once this is done, the warning on the ``Area2D`` node will disappear, as it now has 
+a shape assigned and can interact with other objects.
+
 Make sure to save the scene again after these changes.
 Make sure to save the scene again after these changes.
 
 
 In the next part, we'll add a script to the player node to move and animate it.
 In the next part, we'll add a script to the player node to move and animate it.

BIN
getting_started/first_2d_game/img/no_shape_warning.webp