Antoni
Antoni

Reputation: 1433

Three Js get all elements from multiple scene

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.

Upvotes: 0

Views: 381

Answers (1)

Mugen87
Mugen87

Reputation: 31036

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 );

Upvotes: 4

Related Questions