Xj3D ViewpointSelectionListener

Hello,

I’m working with Xj3D, trying to change the deplacement mode in the world. It’s in the walking mode by default.
I’d like to control the mode by hand.
If anyone know how do I do that, it’d would be helpfull!

In the Xj3D examples I found a code using the ViewpointSelectionListener, but the line is commented and it doesn’t work if I get it out.

Anyone has some light?
Thanks!
A.

Just fetch the NavigationInfo you’re using and change the “type” field to the new mode that you want to use (eg FLY, EXAMINE etc). There’s currently no really easy way of providing custom navigation modes as code, though it can be done. Alternatively, if you wish to do it in-scene, then have a look at the combination of our extension components for X3D for picking and abstract I/O Devices.