Hey all,
I'm trying to iron out the basics of my raycast collision before I add stuff like coyote time, double jumps, etc.. It seems to be almost working perfectly, but there's one tiny issue (and at least one potential issue) that I'm seeing:
When the player lands after a jump or a fall, then occasionally go from grounded (for probably one frame), to not grounded (another frame), to grounded. It's extremely minor, but I want to stamp it out. It seems to happen more if I jump from a high platorm to a low one or a low one to a high one. I tried for a few minutes to get it to happen on flat ground, but no luck.
I'm really stumped here, so any pointers would be appreciated.
Video: https://youtu.be/wdZKlKw3M2I
Code: https://paste.ofcode.org/nbYFBSRFszxzQuiFp2MDsU
Skip to 0:41
Occasionally, when the player lands, they briefly alternate from grounded to not grounded, back to grounded again. The colour of the sprite changes with the "grounded" value.