
WonderBlocks with Working Labels and Directional Connections
We’ve made a lot of progress today.
Where do we begin?
In an attempt to implement drawing/correctly orienting connections between WonderBlocks using thin cylinders, we spent a very long time playing with trigonometric functions, rotation matrices, 3D vectors, euler angles, and the like. After over two full days of experimentation and frustration, we got absolutely nowhere with this, so we decided to use Java 3D’s built-in (but less pretty) line drawing functionality to render connections.
We mentioned yesterday that we were able to improve the shading used on all WonderBlocks, and this is evident in the screenshot above.
We also implemented labels for WonderBlocks, which are visible in the screenshot above. Although it’s not evident from the screenshot, the labels also automatically rotate in the 3D space to always face the in-world camera/avatar. Regardless of where you go in-world (even straight up,) the labels always face you and are perfectly readable. In our current implementation, a label’s color is automatically set to the color of the WonderBlock associated with it.
In addition, we implemented connectional direction indicators. As you can see in the screenshot above, Huey is connected to Dewey bidirectionally, while Dewey is Louie’s parent. We chose to use tiny spheres to indicate direction. Tiny cones may have been a better choice, because they could be made to look more like arrows and clearly show directional relationships, but the aforementioned issues we had with 3D rotation prevented this. Rather than worrying about 3D rotation, using spheres for direction indicators required simple vector math.
We also added a feature that allows the full path to the WonderBlocks Data XML file to be specified in the WonderBlocks WFS WLC XML file. (Whew, that’s a lot of acronyms.)
Next, we are going to investigate creating an in-world HUD that allows WonderBlocks and connections to be added, changed, or removed in-world, as well as the ability to move already existing WonderBlocks (which would also redraw their associated connections.)