Tumbling does not work after setting camera to straight down and setting orientation.
I used a combination of the camera's setEyePoint(), setOrientation(), and setPivotDistance() methods to initialize an overhead view of my scene with a desired orientation about the global Y. When I tried to tumble off of the initial point, there was an issue on line 223 of CameraUI.cpp.
There is a cross product between the view direction point and world up. The vectors are parallel, so the cross product is undefined, giving a NaN in the mU variable. The view was lost from this point forward.
Does setting worldUp help as described in #1965?
I also ran into this bug.
Steps to reproduce:
- Set
mCam->lookAt(vec3(0,200,0), vec3(0,0,0));so that the eyePoint is only y=200. - Try to drag with left button to trigger tumble.
Expected Result: tumbling happens normally Actual Result: camera is rotated to NaN. In other words, eyePoint becomes vec3(-nan,-nan,-nan) at https://github.com/cinder/Cinder/blob/master/src/cinder/CameraUi.cpp#L223