Forum

Target Camera Eye/Target setting issue

11 October 2017 06:28
Hi,
User can rotate/zoom the object by using blender's default camera control
I am developing web app function that user can bring the object to the default view anytime they want.
I using "target_set_trans_pivot" to achieve that.
It usually works but from a certain camera view, it goes to flipped view rather than original view.
I checked camera's rotation, view, target value and all of them looks okay.
Could you please figure out the solution of this?
Please refer picture attached.
12 October 2017 11:14
Hi,
The camera keeps the orientation of its UP-axis, so if it's already flipped from a particular view, then it'll also be flipped after such transformation. You should use the correct_up method to strictly define the camera orientation:
m_cam.target_set_trans_pivot(...);
m_cam.correct_up(camera, m_util.AXIS_Z, true);
 
Please register or log in to leave a reply.