Get Navigation API

navigation
api

(Mvivant) #1

Hi,

I don’t find any function or event to get the navigation (orbit or fps) with the javascript API.
I can change the value on the init but if I will change the value how can get the new value of navigation ?

Thanks!


(Paul Sketch) #2

Welcome,

you’re right indeed, there is no way in current viewer api to get or set navigation, as the need didn’t arise.

What would be your use case ?


(Mvivant) #3

Hi Paul,

I want to use a new controller to move in orbit or FPS, so I have to know what is the type of navigation.

How can move the camera as with mouse or keyboard but with my new controller (3dRudder) ?

Thanks!


(Paul Sketch) #4

If you know the model scale/orientation/bounding box, it won’t be easy to do it, you can use the setCameraLookAt Viewer API - Functions - Sketchfab

Otherwise, if it’s for general browsing of model, I’m afraid we have no API allowing that as for now.