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();
mock.lookAt(knownDirectionVector);
// Then, in the render loop
if (myObject.quaternion.angleTo(mock.quaternion) > 0.1) {
myObject.quaternion.slerp(mock.quaternion, 0.1);
}
2 Likes
Thanks!
The solution above is very simple and easy to understand!
1 Like