How can i remove camera bump after i enable controls.update()

I want my camera to look at specific object so I am using the camera. lookat () but the camera. lookat() was not working with orbit controls so what I have done is disable controls. update() and after my animation, I call control.update but when I try to enable controls. update() my camera jumps I don’t why it’s happening

here is my code

gsap.to(camera.position, {
duration: 3.5,
x: 40,
y: 18,
z: 40,
onUpdate:function(){
camera.lookAt(
21.852250858269887,
12.523004055023193,
19.47301152060269
)
},
onComplete:function(){
clicked.check=false

},
});

clicked.check=false disable the controls.update()

Is there a reason you’re using camera.lookAt() rather than controls.target?

1 Like