AnsweredAssumed Answered

Setting camera direction doesn't work

Question asked by Joep Ronde on Feb 7, 2019
Latest reply on Feb 25, 2019 by Joep Ronde

The setCameraDir API function of the TConnect 3D Viewer does not always work. In following case it is not setting the camera direction as given in the parameters. 

 

viewer.setCameraDir([0.6, -0.5, -0.5]);

viewer.getCameraDir(p=>{console.log(p)});

 

The result of this is:

{0: -0.6469966173171997, 1: 0.5391638875007629, 2: -0.5391638875007629}

And not {0: 0.6, 1: -0.5, 2: -0.5} as expected.

 

Why is that? Am I doing something wrong here or is this a bug?

 

Also I can't find a way to set the camera upvector. I would expect a setCameraUpVect function just like there's a getCameraUpVect, but there's none. How can I set the camera upvector?

 

Joep Ronde

Outcomes