27 April 2015 22:05
So I have created a product viewer to be incorporated into training materials. This viewer allows the user to fly around the object in three dimensional space. I'm having an issue with resetting the camera back to its original position. Upon initialization I capture the following parameters from the camera: Pivot(m_camera.get_pivot), Velocity(m_camera.get_velocity_params), Eye (m_camera.get_eye), and Limits(m_camera.get_cam_dist_limits). When the user clicks the reset button (HTML UI) I reset the following parameters: Pivot(m_camera.set_pivot) and Look At(m_camera.set_look_at). The only time this doesn't work is when I move the camera to a top view and try to reset the camera. It traces the same details as the initial camera capture after the reset, but looks nothing like the initial view. If I change the angle to be more of a 3Q view, it resets perfectly fine. Is this an issue with my calls or a Blend4Web issue? I think that if I add vertical limits to the camera this may help fix the issue as well. Any ideas?