1
Fork 0
mirror of https://github.com/Steffo99/looping-for-loops.git synced 2024-11-29 03:24:20 +00:00
looping-for-loops/Scripts/ExtendedKinematicBody2D.gd

11 lines
242 B
GDScript3
Raw Normal View History

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