question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Raycaster.intersectObjects() recursive flag

See original GitHub issue

Perhaps 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Mugen87commented, Jul 3, 2021
1reaction
Mugen87commented, Mar 17, 2021

I vote to give this a try and see how it goes. It seems the more appropriate default to me.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found