Use a form of visual debugging to visualise your queries in the space of the scene.
Be particularly cautious to provide the exact same values you use in your query.
Watch out for these common mistakes:
- Using a position in place of an input requiring a direction.
- Using a position or direction from a different object than expected.
- Using a position or direction in the wrong space. Queries usually made in world space.