Viewer API: getCameraLookAt() ignores autospin model rotation

(Andrew Leahy) #1

Hi, not sure if you want API bugs here in the forum or on an issues page somewhere? Anyhow...

When using getCameraLookAt() on a scene which has autospin enabled. The returned camera does not match the rotated scene. The camera is from before the scene started turning. Not a biggy, just thought it was interesting.

Cheers, Andrew

(Mauricesvay) #2

Hi @alfski,

as far as I know, when the model is set to autospin, the camera do not moves but the model is. The returned camera position is actually correct. Hope that helps.

(Klaasnienhuis) #3

This behavior inspired some feature requests from a while back regarding rotating the model, camera and lights separately:

(Andrew Leahy) #4

Hi Klaas I hadn't read your post, I agree with what you wrote.

Basically it means if someone is writing Viewer API code that manages the camera and they want to "rotate the scene" they have to write camera orbit code.

Which they must do with the current API since there's no API method to start & stop "autospin" (you can only set it at initialisation). If you can't manage 'autospin' it doesn't really matter if the cameraLookAt is updated or not, so the discussion is mostly moot for the moment.

Like I said this isn't terrible. It was a little unexpected that's all.