mirror of
https://github.com/Steffo99/looping-for-loops.git
synced 2024-11-25 01:24:21 +00:00
10 lines
242 B
GDScript
10 lines
242 B
GDScript
extends KinematicBody2D
|
|
class_name ExtendedKinematicBody2D
|
|
|
|
|
|
func get_floor():
|
|
for slide in get_slide_count():
|
|
var collision = get_slide_collision(slide)
|
|
if collision.normal != get_floor_normal():
|
|
continue
|
|
return collision.collider
|