Do you have anyone help me, why is camera shaking when animation finish.

It looks like the direction facing the camera has been reset.
https://playground.babylonjs.com/#DWZ1PK

Welcome to the forum !!!

it looks like a gimbal lock issue as you are exactly at the pole at the end.

@PolygonalSun could you have a look ?

When you say the direction facing the camera has been reset, are you referring to that snap at the end of the animation where the alpha/beta values change after the animation? I also noticed that you’re setting the target to tarPoint (line 59) and then starting an animation to set it to the same point (lines 60-61). You should be able to just remove line 59 to move without that snap, unless I’m misunderstanding the issue. Is my interpretation of the issue correct?

1 Like

Thx~your reply

I removed line 59 then, camera was not shaked. but I wanted camera look at this point. if has not line 59 , camera look at zero point yet.

How change camera look at point when finished animation ? I want a camera that can roam and rotate, it’s can change rotate target.

If you’re looking for a smoother transition to a desired target, you should also look into using an animation to update your camera’s target with your camera’s move position. It looks like you set up the animation for your target change (lookanim) but never started it. Just as a reference, here’s our page on combining animations, if you’re curious: Combining Animations | Babylon.js Documentation (babylonjs.com)

Hey @viweei, I just wanted to check-in and see if you had any luck with doing adding/running a target animation.

1 Like

I tried taking a look at this, but I wasn’t able to get a smooth animation with the ArcRotateCamera, so I switched to the Free/UniversalCamera. I think the only way to not have this “jerk”, either at the beginning or at the end, would be explicitly animating the camera’s rotationQuaternion property to get the proper SLERP:

Testing camera | Babylon.js Playground (babylonjs.com)

Quaternion Interpolation - Interactive 3D Graphics - YouTube

But maybe other people will have some ideas to do that with ArcRotateCamera :smiley: