Forum

How to reverse eye camera rotation with only replace function object and something like that?

18 October 2018 07:53
HI, devs.
I want to know about how to do eye camera rotation reverse without override engine source code and library source code? (override meaning is to override directory source code of inside src directory.)

I tried to replace the function object.
m_cam.rotate_angles =  function(obj, d_phi, d_theta) {
            var render = obj.render;
            var ms = render.move_style;
            console.log("test!!");
            if (ms === exports.MS_TARGET_CONTROLS)
                rotate_target_angles(obj, d_phi, d_theta);
            else if (ms === exports.MS_EYE_CONTROLS)
                rotate_eye_angles(obj, d_phi*-1, d_theta*-1);  // <===this line here
            else if (ms === exports.MS_HOVER_CONTROLS)
                rotate_hover_angles(obj, d_phi, d_theta);
            else if (ms === exports.MS_STATIC)
                rotate_static_angles(obj, d_phi, d_theta);
        }

That is not working.
I mean I want to reverse eye camera rotation from request mouse inputs.
How to do that?

I tried these and that is not working.
topic 1 : https://www.blend4web.com/en/forums/topic/1456/
topic 2 : https://www.blend4web.com/en/forums/topic/3721/?page=1#post-18928
 
Please register or log in to leave a reply.