Does adding lookat() prevent camera panning?

I’m using a perspective camera and noticed that panning stops after adding lookat()… just wondering if this is supposed to happen?

One question: Are you using OrbitControls? :innocent:

1 Like

I am, yes.

I’ve created a small fiddle but I’m not able to reproduce the issue: https://jsfiddle.net/f2Lommf5/14514/

What are you doing different?

I recreated the issue. Here’s the link:

https://jsfiddle.net/darcypaterson/z1v457k9/1/

Ultimately, I want the camera to look over the scene when it first loads. Then with the first mouse move (finger move) the camera behaves the way it usually does with the y-axis at 0.

Here’s the development version for reference.
https://darcypaterson.github.io/assets/index.html

The problem is you call lookAt() in the render loop. In this case panning can’t work since you overwrite the orientation of the camera each frame. Try to set the initial orientation just once like in this fiddle:

https://jsfiddle.net/z1v457k9/7/

1 Like

Of course! That’s it… thanks.