diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 7395556d05d..51cc752caed 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -71,10 +71,10 @@ print("Collided with: ", collision.collider.name) [/gdscript] [csharp] - for (int i = 0; i < GetSlideCount(); i++) + for (int i = 0; i < GetSlideCollisionCount(); i++) { KinematicCollision2D collision = GetSlideCollision(i); - GD.Print("Collided with: ", (collision.Collider as Node).Name); + GD.Print("Collided with: ", (collision.GetCollider() as Node).Name); } [/csharp] [/codeblocks]