You assume here that all meshes that forms the flower are a direct child of the flower group. However, this is only true for the leaf. The meshes you create with createStem(), createVase() and createStem() are actually Group objects (because SceneUtils.createMultiMaterialObject returns an object of type Group). Have you tried to click on the leaf? The redirect to Google works .
Instead of changing the way how you generate the flower, I would change the raycasting to this:
So try to perform the raycasting with concrete objects and not with the entire scene. This is actually more performant since you save unnecessary intersection tests.
Oh wow, I would never have worked that out myself, so that’s why it wasn’t working, because MultiMaterial returns a Group. Hats down to you sir, as it is said: “the more you know”
Did it according to your suggestion, works well now, cheers!