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:
parent
1c7bd972e4
commit
1507bea80c
|
@ -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++)
|
||||||
|
|
Loading…
Reference in New Issue