Skip to content

Commit a3a8913

Browse files
authored
Merge pull request #7430 from kkoang/patch-10
Update using_character_body_2d.rst
2 parents a1a5660 + 8078590 commit a3a8913

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tutorials/physics/using_character_body_2d.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Movement and walls
223223
If you've downloaded the sample project, this example is in "basic_movement.tscn".
224224

225225
For this example, add a ``CharacterBody2D`` with two children: a ``Sprite2D`` and a
226-
``CollisionShape2D``. Use the Godot "icon.png" as the Sprite2D's texture (drag it
226+
``CollisionShape2D``. Use the Godot "icon.svg" as the Sprite2D's texture (drag it
227227
from the Filesystem dock to the *Texture* property of the ``Sprite2D``). In the
228228
``CollisionShape2D``'s *Shape* property, select "New RectangleShape2D" and
229229
size the rectangle to fit over the sprite image.
@@ -272,7 +272,7 @@ Attach a script to the CharacterBody2D and add the following code:
272272
Run this scene and you'll see that ``move_and_collide()`` works as expected, moving
273273
the body along the velocity vector. Now let's see what happens when you add
274274
some obstacles. Add a :ref:`StaticBody2D <class_StaticBody2D>` with a
275-
rectangular collision shape. For visibility, you can use a sprite, a
275+
rectangular collision shape. For visibility, you can use a Sprite2D, a
276276
Polygon2D, or turn on "Visible Collision Shapes" from the "Debug" menu.
277277

278278
Run the scene again and try moving into the obstacle. You'll see that the ``CharacterBody2D``
@@ -436,7 +436,7 @@ And the code for the Bullet:
436436

437437
The action happens in ``_physics_process()``. After using ``move_and_collide()``, if a
438438
collision occurs, a ``KinematicCollision2D`` object is returned (otherwise, the return
439-
is ``Nil``).
439+
is ``null``).
440440

441441
If there is a returned collision, we use the ``normal`` of the collision to reflect
442442
the bullet's ``velocity`` with the ``Vector2.bounce()`` method.

0 commit comments

Comments
 (0)