Raycaster.intersectObjects() recursive flag
See original GitHub issuePerhaps it would be a good idea to default the recursive flag to true
in Raycaster.intersectObjects( objects, recursive, optionalTarget )
.
Failure to set the flag to true has caused confusion with users on StackOverflow for a long time.
I wonder how many current users are relying on the fact that the default value is something other than true
?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Raycasting against 'subscenes' in three.js - Stack Overflow
You just need to set the recursive flag: var intersects = raycaster.intersectObjects( scene.children, true );. three.js r.58.
Read more >Raycaster#intersectObject – three.js docs
Raycasting is used for mouse picking (working out what objects in the 3d space the mouse is ... intersectObject ( object : Object3D,...
Read more >[Solved]-RayCast intersect on multimaterial-three.js
Coding example for the question RayCast intersect on multimaterial-three.js. ... You need to pass the recursive flag into intersectObjects() like so:
Read more >Mouse-Picking Collada Models with three.js, Part II - Jens Arps
The Code · // Ask the raycaster for intersects with all objects in the scene: · // (The second arguments means "recursive") ·...
Read more >[WebGL] Three.js - 마우스 위치, 이벤트 관련
intersectObject ( object, recursive ) ... setFromCamera( mouse.clone(), camera ); var objects = raycaster.intersectObjects(scene.children);.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another user stumbled across this issue:
https://discourse.threejs.org/t/three-js-raycaster-doesnt-detect-intersection-with-gltf-object/27746
I vote to give this a try and see how it goes. It seems the more appropriate default to me.