Yes! Use a binary search: First do a step that is 50% of the max distance you want to cast. Picked something? (Where picking could be a simple raycasting algorithm, doesn't have to be a 3D LinePick). Well if you picked something then check 25% of the max distance (if there was nothing, try 75% !). Then continue this binary search by dividing the remaining rest of the unchecked zone by 2: 50%,75%(or 25%), 87.5%, 93.75%...... This way you'll have a 32 Bit accuracy with a max of 32 Steps, be it int or float.
BTW have a look at my raycasting flight simulator, that features hills (just like stairs) in the archives.
BTW have a look at my raycasting flight simulator, that features hills (just like stairs) in the archives.