Currently, I am implementing a ray caster to choose objects within my three.js scene. The specific objects I am working with are box geometries shaped like flooring.
After a successful selection of an object, I encountered an issue where resizing the window caused the ray caster to continue referencing the original positions of the objects. Consequently, selecting an object may not trigger any action, or selecting no object might unexpectedly result in an object being selected.
What steps can be taken to resolve this issue and ensure the ray caster is updated accordingly?