Skip to content

Commit b82187d

Browse files
Clarify Area2D warning behavior (#10173)
* Clarify Area2D warning behavior * Apply suggestions from code review --------- Co-authored-by: tetrapod <[email protected]>
1 parent f94cdb1 commit b82187d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

getting_started/first_2d_game/02.player_scene.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,16 @@ what the object *is*. Click the "Other Node" button and add an :ref:`Area2D
2020

2121
.. image:: img/add_node.webp
2222

23-
Godot will display a warning icon next to the node in the scene tree. You can
24-
ignore it for now. We will address it later.
23+
When you add the ``Area2D`` node, Godot will display the following **warning icon**
24+
next to it in the scene tree:
25+
26+
.. image:: img/no_shape_warning.webp
27+
28+
This warning tells us that the ``Area2D`` node requires a shape to detect collisions or overlaps.
29+
We can **ignore the warning temporarily** because we will first set up the player's visuals
30+
(using an animated sprite). Once the visuals are ready, we will add a collision shape as a child
31+
node. This will allow us to accurately size and position the shape based on the sprite’s appearance.
32+
2533

2634
With ``Area2D`` we can detect objects that overlap or run into the player.
2735
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:
98106

99107
.. image:: img/player_scene_nodes.webp
100108

109+
Once this is done, the warning on the ``Area2D`` node will disappear, as it now has
110+
a shape assigned and can interact with other objects.
111+
101112
Make sure to save the scene again after these changes.
102113

103114
In the next part, we'll add a script to the player node to move and animate it.
14.7 KB
Loading

0 commit comments

Comments
 (0)