@cybereality said:
You need gravity for is_on_floor() to work.
Gravity is set.
@Calinou said:
I would recommend using a low-pass filter for is_on_floor(), as it's known to be unreliable. In other words, >store the results of is_on_floor() for the last 3 frames, and consider it to be true as soon as at least one of the 3 >recent frames had is_on_floor() return true.
See also Shifty's character movement manifesto.
That's absolutely brilliant, thank you so much. I'll definitely try that.
And I'll check the link too. Ty.
@cybereality said:
Right, because the collision response in Godot (or any physics engine really) aims to resolve collisions. Meaning if an object is going inside the floor, it will move it up to be laying on the floor. But because of floating-point inaccuracy, it is hard to be exactly on the floor, so there may be times where is_on_floor() is either true or false but should always be true. Honestly, this has not been a problem for me. As I check for velocity.y to be above or below some small value (for example to trigger a fall animation) and this works fine.
I've solved similar issues with, myself. at least for the sheer inconsistency of velocity and conditional detection.
I'm surprised Godot thinks such gigantic precision is needed for games of all things. I might have to create a system to round those numbers off, myself...
Ty all for the help. I'll be back later to relay my results