is_on_floor() is not working correctly even tough I am using it right and I call move_and_slide() before it.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By k4b00m-Hozaifa

So I am Stuck at a problem where my player is not jumping I think I have implemented everything right and is_on_floor() is not working right. I have been stuck on this problem for 2 days now. I have made custom key maps so don’t worry about those. I think the problem is with is_on_floor(). This is the YouTube tutorial I am following with the timestamp of where I got stuck.

You can find my code here. The code is stored in /Source/Actors/Player.gd and Actor.gd where player.gd extends actor.gd you can also check what ever you want there. Any help will be great thanks guy.

:bust_in_silhouette: Reply From: kidscancode

is_on_floor() is set based on the floor normal value you pass to move_and_slide(). You’re not passing a floor normal.