Closed DinkeyKing closed 1 week ago
Progress in 0ec3554. Capsule colliders now detect the floor surface of steps that are not too shallow, but short steps prove to be a problem, due to the height of the collision point still being higher than the maximum allowd height, for some odd reason.
I finally figured out that the shape radius has to be added on top of the max allowed height, which makes stepping work properly for capsules and spheres. Snapping down stairs now also work. 4b88e76
The function for step detection doesn't work for capsule (or sphere) colliders. The downard cast on ledges won't return floor collision normals because of the rounded bottom of the collider shape, which is the expected behaviour. Checking surface normals could be a solution, but currently the function raycasting the collision points does not hit the floor surface in this scenario for some reason.