OrbitControls, .setFromUnitVectors() is not a function error

Hi, I am developing 3D modeling on my website and i get error on line of the code in OrbitControls.js. The error says setFromUnitVectors is not a function. The error seems to occur on line number 130 of the OrbitContorls.js.

130 : “var quat = new THREE.Quaternion().setFromUnitVectors( object.up, new THREE.Vector3( 0, 1, 0 ) );”

I included all three.js, three.min.js and it doesn’t work. Please help me on this.

This doesn’t seem to be a three.js related error. You’re trying to call a function on an object that doesn’t exist. It’s probably undefined which would cause this error. Unfortunately, it’s impossible to tell what is going on from the limited information that you have provided.

Please demonstrate the issue with a live example.