Rotate the cube animated, knowing only the vector direction

I can use lookAt method, but it’s not what I want.
I need to provide animated rotation toward vector direction.
All vectors are known.
I’m stuck, pls help

You can create a mock Object3D, use lookAt on it (without ever adding it to the scene or assigning it any geometry or materials), then slerp original Object’s quaternion smoothly to the mock’s quaternion.

const mock = new Object3D();

// Then, in the render loop
if (myObject.quaternion.angleTo(mock.quaternion) > 0.1) {
  myObject.quaternion.slerp(mock.quaternion, 0.1);


The solution above is very simple and easy to understand!

1 Like