mirror of
https://github.com/Steffo99/looping-for-loops.git
synced 2024-11-25 09:34:22 +00:00
11 lines
242 B
GDScript3
11 lines
242 B
GDScript3
|
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
|