Browse Source

Merge pull request #6903 from cbscribe/charbody_fix

Fix incorrect method name in Using CharacterBody2D
Rémi Verschelde 2 years ago
parent
commit
4ab09f7b89
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tutorials/physics/using_character_body_2d.rst

+ 2 - 2
tutorials/physics/using_character_body_2d.rst

@@ -136,7 +136,7 @@ and ``get_slide_collision()``:
 
     # Using move_and_slide.
     move_and_slide()
-    for i in get_slide_count():
+    for i in get_slide_collision_count():
         var collision = get_slide_collision(i)
         print("I collided with ", collision.get_collider().name)
 
@@ -151,7 +151,7 @@ and ``get_slide_collision()``:
 
     // Using MoveAndSlide.
     MoveAndSlide();
-    for (int i = 0; i < GetSlideCount(); i++)
+    for (int i = 0; i < GetSlideCollisionCount(); i++)
     {
         var collision = GetSlideCollision(i);
         GD.Print("I collided with ", ((Node)collision.GetCollider()).Name);