Interaction with batch generate world


How can I add an eventlistener for mouse clicks on a batch generated world, and on its objs in h3d.scene


You create an h3d.scene.Interactive with a given shape in order to detect clicks. You can look at the Interactive sample that showcase mixing 2D and 3D interactives.


But that has no interaction with batched world, as all objects there are optimized together. So I cannot use batched generated world like in the world example, if I want to have interactions there?


You can use batched world, and then still have several Interactive (one per object). Batching is good for GPU performances, Interactive handling does not involves GPU, mostly CPU but yes that requires a bit of by-hand management to put them at the right place wrt your batched objects.