Forum

[SOLVED]Camera animation doesn't completely work with Camera limits systems.

15 October 2018 16:14
Hi tp_up :)
Thank you for sharing that useful information.
Finally, I'm fixed that problem.

First of all, we need to use "rotation_camera function" and "m_time.animation" because we have to play the animation at the same speed.

Please check my source code.
var saveEase = 0;
var animEndTime = endTime- startTime;
//Animation is stop when it has done moving same length of start to target
cur_animator_phi = m_time.animate(0, angle_phi, time, function(e) {
            if(delta_phi >= Math.abs(angle_phi)){ // <== here is very important. 
                _is_camera_stop_rotating = false;
                m_time.clear_animation(cur_animator_phi);
                return;
            }

            var animTime = m_time.get_timeline() - startTime;

            var easeing = easeIn(animTime,0,angle_phi,animEndTime) - saveEase;
            saveEase += easeing;
            m_cam.rotate_camera(cam_obj, easeing, 0);
            delta_phi = e;
        });


B4W animation has a problem.
That problem is not completely playing for an endpoint.
If you want to go to same target point you should righting source code like that.

if you want to attach easein_easeout effect you should use "m_time" module and calculate start time and end time yourself.

I hope this section is useful for any another people.
Thank you

y-Shimada.
 
Please register or log in to leave a reply.