For some reason, is_on_wall is returning as true when a kinematic body is placed either next to the side of or above a cube mesh (with proper cube collision) placed from a gridmap. is_on_floor is never triggered, what could be the issue?
In these screenshots, the 2D sprite of sonic is the kinematic body, it has a collision box of just slightly larger than the sprite itself, extended on the z-axis obviously, and a print command is set up to print when is_on_floor or _is_on_wall is triggered. One thing to note is that there seems to be an elevation at the corners of the cubes placed from the GridMap, where the kinemtaic body lifts up slightly when crossing the edge of a cube and especially high while on the corner inbetween 4 cubes. The collision set on the mesh is a perfect cube surrounding the block, so I'm not sure what is wrong. (details of the collision shape and the problem in question shown below) there is a shadow raycasted directly below the player at it's center so you can see how it is floating above ground slightly
UPDATE: Even a plain staticbody with a box collision and box mesh is not returning is_on_floor! What's going on??
Is your collider maybe intersecting through the 'floor' and as such not detecting any floor below the collider?
Megalomaniak Sadly that's not the case, the body is placed above the floor before runtime when it then falls to the floor, collision does not intersect the floor, and the body is capable of moving above it properly. I have attempted to meddle with safe margins and such but the results are the same.
I figured it out! I needed to add: "velocity = move_and_slide(velocity, Vector3.UP)" to the code so godot could detect the floor. Every bug I mentioned is now fixed! Sort of, the corners/edges are causing some slight jittering still, and is_on_floor is sometimes false when on them, however the center of the tiles and the static body is working perfectly.