How to use iOS (Swift) SceneKit SCNSceneRenderer unprojectPoint properly
Typical depth buffers in a 3D graphics pipeline are not linear. Perspective division causes depths in normalized device coordinates to be on a different scale. (See also here.) So the z-coordinate you’re feeding into unprojectPoint isn’t actually the one you want. How, then, to find the normalized-depth coordinate matching a plane in world space? Well, … Read more