I've been trying to implement a feature where the raycaster in onDocumentMouseDown can detect sprites when the user clicks on any part of them. However, despite borrowing from several examples, I seem to be facing alignment issues. Currently, the picking functionality is off, as clicking slightly to the right, above, or below a sprite may trigger it, while clicking directly on the left edge has no effect. There seems to be a misalignment that I can't seem to pinpoint. Any advice or guidance on this matter would be greatly appreciated.
<script src="/common/three.js"></script>
<script src="/common/Detector.js"></script>
<script src="/common/CanvasRenderer.js"></script>
<script src="/common/GeometryUtils.js"></script>
<script src="/common/OrbitControls.js"></script>
<div id="WebGLCanvas"></div>
<script>
// Your script here
.</script>