This is based roughly on the spacenav.tox from here, thanks Bruce and Keith for the prior discussion:
But develops it in a way that I found a little less complex and intuitive. I built it primarily as a means of navigating the visualiser in d3, using OSC and an Open layer to control the camera position.
This started out as a means of navigating d3 using an Oculus, but I have implemented a visualiser cam rotation element so it works with the normal visualiser.
Its pretty basic, you move the camera around in XYZ using the joystick or shoulder buttons [for Y only].
As you rotate in Y, your forward motion follows the direction you are facing, so more FPS than asteroids. This is done by continually updating the position of a parent node every frame using an execute DAT.
The X rotation of the head ignores heading position so you can look around but won’t fly off in the direction you are looking if its up or down.
b1 can be used return to the origin.
Hopefully this is of some use to someone, not just d3 users.
EDIT: removed inversion requirement in d3.
d3_control.tox (3.8 KB)