Thank you for your response!
I’m using it to position some meshes and sprites on the ground surface.
In the post you’ve linked to the discussion is about collisions, but I don’t use collisions in my scene. The meshes and sprites I’m using are static so I prefer to position them only once on the scene loading, so there is no need to have collision detection activated all the time.
It doesn’t matter if you’re detecting collisions or not. The issue is that to detect coordinates, you need to look at how the ray is fired in your scene and at what object (type) is used to detect the position. It appears that using the subdivisions of an octree set at 128 divisions, the ray doesn’t know where to fire (cast), so it returns a NaN value as it cannot compute.