is_on_floor alway return false although it's on floor

Hi everyone,

I’m having an issue where is_on_floor() always returns false, even though my character is visually standing on the ground. Because of this, my jump logic doesn’t trigger.

Here is my character’s movement code:

I found this, I think that’s the exact problem you have.

This looks like the standard CharacterBody2D boilerplate code, except for this bit:

  var direction = In

Pretty sure you’re assigning the wrong thing to direction there. Does this not log any errors to your console?

Please check :