Fix CharacterBody2D get_slide_collision docs

The indentation was off and the code usage was incorrect for Godot 4.0 GDScript.

(cherry picked from commit 2b6e1550ff)
This commit is contained in:
Brett Chalupa 2023-03-10 11:39:28 -05:00 committed by Yuri Sizov
parent 1c7bd972e4
commit 1507bea80c
1 changed files with 2 additions and 2 deletions

View File

@ -67,8 +67,8 @@
[codeblocks] [codeblocks]
[gdscript] [gdscript]
for i in get_slide_collision_count(): for i in get_slide_collision_count():
var collision = get_slide_collision(i) var collision = get_slide_collision(i)
print("Collided with: ", collision.collider.name) print("Collided with: ", collision.get_collider().name)
[/gdscript] [/gdscript]
[csharp] [csharp]
for (int i = 0; i < GetSlideCollisionCount(); i++) for (int i = 0; i < GetSlideCollisionCount(); i++)