Quaternion.rotateTowards() function not available?

this time I just have simple question.

In the Quaternion documentation I can find the roateTowards function:

But why am I not able to use this function?

Three is installed with npm and updated.

function animate() {
  if (mixer) mixer.update(clock.getDelta());
    renderer.render(scene, camera);

  let targetQuaternion = new THREE.Quaternion(); // just for testing

    gltfObj.scene.quaternion.rotateTowards(targetQuaternion, 1);

The console tells me that rotateTowards is not a function.

Greets :slight_smile:

The method is used in this example: https://threejs.org/examples/webgl_math_orientation_transform.html

What version of three.js are you using?

Thank you for the reply.

I updated three js with the npm, the latest version was not installed. Now it’s working :slight_smile:

Thank you

1 Like