|
@@ -9,7 +9,7 @@ importing the start assets and setting up the game scene.
|
|
We've prepared a Godot project with the 3D models and sounds we'll use for this
|
|
We've prepared a Godot project with the 3D models and sounds we'll use for this
|
|
tutorial, linked in the index page. If you haven't done so yet, you can download
|
|
tutorial, linked in the index page. If you haven't done so yet, you can download
|
|
the archive here: `Squash the Creeps assets
|
|
the archive here: `Squash the Creeps assets
|
|
-<https://github.com/GDQuest/godot-3d-dodge-the-creeps/releases/tag/1.1.0>`__.
|
|
|
|
|
|
+<https://github.com/godotengine/godot-3d-dodge-the-creeps/releases/tag/1.1.0>`__.
|
|
|
|
|
|
Once you downloaded it, extract the .zip archive on your computer. Open the
|
|
Once you downloaded it, extract the .zip archive on your computer. Open the
|
|
Godot project manager and click the *Import* button.
|
|
Godot project manager and click the *Import* button.
|
|
@@ -39,7 +39,7 @@ Setting up the playable area
|
|
----------------------------
|
|
----------------------------
|
|
|
|
|
|
We're going to create our main scene with a plain :ref:`Node <class_Node>` as its root. In the
|
|
We're going to create our main scene with a plain :ref:`Node <class_Node>` as its root. In the
|
|
-*Scene* dock, click the *Add Node* button represented by a "+" icon in the
|
|
|
|
|
|
+*Scene* dock, click the *Add Child Node* button represented by a "+" icon in the
|
|
top-left and double-click on *Node*. Name the node ``Main``. Alternatively, to add
|
|
top-left and double-click on *Node*. Name the node ``Main``. Alternatively, to add
|
|
a node to the scene, you can press :kbd:`Ctrl + a` (or :kbd:`Cmd + a` on macOS).
|
|
a node to the scene, you can press :kbd:`Ctrl + a` (or :kbd:`Cmd + a` on macOS).
|
|
|
|
|
|
@@ -64,8 +64,7 @@ its shape. If you click the icon, a popup appears to give you more information.
|
|
.. image:: img/01.game_setup/07.collision_shape_warning.png
|
|
.. image:: img/01.game_setup/07.collision_shape_warning.png
|
|
|
|
|
|
To create a shape, select the :ref:`CollisionShape3D <class_CollisionShape3D>` node, head to the *Inspector*
|
|
To create a shape, select the :ref:`CollisionShape3D <class_CollisionShape3D>` node, head to the *Inspector*
|
|
-and click the *<empty>* field next to the *Shape* property. Create a new *Box
|
|
|
|
-Shape3D*.
|
|
|
|
|
|
+and click the *<empty>* field next to the *Shape* property. Create a new *BoxShape3D*.
|
|
|
|
|
|
.. image:: img/01.game_setup/08.create_box_shape3D.jpg
|
|
.. image:: img/01.game_setup/08.create_box_shape3D.jpg
|
|
|
|
|
|
@@ -86,7 +85,7 @@ with it. Select the ``Ground`` node and add a :ref:`MeshInstance3D <class_MeshIn
|
|
|
|
|
|
.. image:: img/01.game_setup/10.mesh_instance3d.png
|
|
.. image:: img/01.game_setup/10.mesh_instance3d.png
|
|
|
|
|
|
-In the *Inspector*, click on the field next to *Mesh* and create a `BoxMesh <class_BoxMesh>`
|
|
|
|
|
|
+In the *Inspector*, click on the field next to *Mesh* and create a :ref:`BoxMesh <class_BoxMesh>`
|
|
resource to create a visible box.
|
|
resource to create a visible box.
|
|
|
|
|
|
.. image:: img/01.game_setup/11.box_mesh.webp
|
|
.. image:: img/01.game_setup/11.box_mesh.webp
|
|
@@ -103,7 +102,7 @@ We're going to move the ground down so we can see the floor grid. Select the
|
|
``Ground`` node, hold the :kbd:`Ctrl` key down to turn on grid snapping (:kbd:`Cmd` on macOS),
|
|
``Ground`` node, hold the :kbd:`Ctrl` key down to turn on grid snapping (:kbd:`Cmd` on macOS),
|
|
and click and drag down on the Y axis. It's the green arrow in the move gizmo.
|
|
and click and drag down on the Y axis. It's the green arrow in the move gizmo.
|
|
|
|
|
|
-.. image:: img/01.game_setup/13.move_gizmo_y_axis.png
|
|
|
|
|
|
+.. image:: img/01.game_setup/move_gizmo_y_axis.webp
|
|
|
|
|
|
.. note::
|
|
.. note::
|
|
|
|
|
|
@@ -128,11 +127,11 @@ Ultimately, ``Ground``'s transform.position.y should be -1
|
|
.. image:: img/01.game_setup/ground_down1meter.webp
|
|
.. image:: img/01.game_setup/ground_down1meter.webp
|
|
|
|
|
|
Let's add a directional light so our scene isn't all grey. Select the ``Main``
|
|
Let's add a directional light so our scene isn't all grey. Select the ``Main``
|
|
-node and add a child node :ref:`DirectionalLight <class_DirectionalLight3D>`.
|
|
|
|
|
|
+node and add a child node :ref:`DirectionalLight3D <class_DirectionalLight3D>`.
|
|
|
|
|
|
.. image:: img/01.game_setup/create_directional_light3d.webp
|
|
.. image:: img/01.game_setup/create_directional_light3d.webp
|
|
|
|
|
|
-We need to move and rotate the :ref:`DirectionalLight <class_DirectionalLight3D>` node.
|
|
|
|
|
|
+We need to move and rotate the :ref:`DirectionalLight3D <class_DirectionalLight3D>` node.
|
|
Move it up by clicking and dragging on the manipulator's green arrow
|
|
Move it up by clicking and dragging on the manipulator's green arrow
|
|
and click and drag on the red arc to rotate it around the X axis, until the
|
|
and click and drag on the red arc to rotate it around the X axis, until the
|
|
ground is lit.
|
|
ground is lit.
|