1
Fork 0
mirror of https://github.com/Steffo99/looping-for-loops.git synced 2024-11-25 17:44:22 +00:00
looping-for-loops/Scripts/ExtendedKinematicBody2D.gd

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