0

I have multiple scene like => How to change the zOrder of object with Threejs?.

I want to select now an element with a Raycast, but I get one raycast for each scene, how can I handle all taken elements from all scenes at ones.

gman
  • 100,619
  • 31
  • 269
  • 393
Antoni
  • 1,316
  • 2
  • 16
  • 42

1 Answers1

4

You can try to add all objects of both scenes into a separate array. In the next step, you use this array in order to call Raycaster.intersectObjects() like this:

raycaster.intersectObjects( objects );
Mugen87
  • 28,829
  • 4
  • 27
  • 50