-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Description
Description of the problem
When trying to get intersections with a Sprite using a Raycaster like so:
const raycaster = new Raycaster(source, target, 0, Infinity);
const intersection = [];
leaf.object.raycast(raycaster, intersection);This gets thrown:
TypeError: Cannot read property 'matrixWorld' of undefined
culprit:
three.js/src/objects/Sprite.js
Line 105 in 5c600d9
| viewWorldMatrix.copy( raycaster._camera.matrixWorld ); |
the issue is that a _camera object is somehow expected where there is none. Looks like this was introduced originally in here:
2fda472#diff-cf59543b9c35550d3d4f19faa7f3b4a5
Three.js version
- r106
Browser
- Chrome
OS
- Windows
Metadata
Metadata
Assignees
Labels
No labels