Adding interactivity to 3D vector text and shapes
Adding interactivity to 3D vector objects basically works the same as adding interactivity to any other 3D object. You can use the InteractiveScene3DEvent similar to what we have done in previous chapters. However, to increase the accuracy you should import VectorShapeHitTest, which is located in the org.papervision3d.core.render.command package, and add the following line at the top of your init() method:
VectorShapeHitTest.instance.assignViewport(viewport);
Another aspect worth taking a look at, is adding interactivity to 3D text. If you would try to add an event listener to a Text3D instance directly, you are out of luck. Adding interactivity is done by adding listeners to the letters of the text. Let's see how that works.
Adding interactivity to 3D text
Again, we will take the Text3DTemplate as our starting point. We will create a simple example with some 3D text and make it interactive. When the mouse hovers a letter, it will turn...