Camera rocking/swaying Orbit camera/controls

Hello I am wondering how one would do this kind of effect were the camera kind of sways/ rocks like on https://interview.ueno.co the effect is very subtle I am also wondering how to restrict the camera rotation like on the above site does using orbit camera I have kind of restricted my camera but It stops abruptly and isn’t smooth.

OrbitControls has autoRotate, enableDamping and associated params which might be able to achieve that effect.

Example

Thanks for the reply but I don’t think that is what I am after as if you look closely the swaying also moves up and down not just left and right it is very subtle

1 Like

Just from the scratch:
https://jsfiddle.net/prisoner849/z85ah40s/

1 Like

How would I add this to a mousemove event instead of mousedown and up? (Im new to three and js so might be a stupid question)
this is how I’ve added it so far but it kind of messes up the onmousemove when trying to move the scene when the mouse moves: https://codepen.io/uiunicorn/pen/VwvxrGz