MCPcopy
hub / github.com/mrdoob/three.js / worldToLocal

Method worldToLocal

src/core/Object3D.js:677–683  ·  view source on GitHub ↗

* Converts the given vector from this 3D object's world space to local space. * * @param {Vector3} vector - The vector to convert. * @return {Vector3} The converted vector.

( vector )

Source from the content-addressed store, hash-verified

675 * @return {Vector3} The converted vector.
676 */
677 worldToLocal( vector ) {
678
679 this.updateWorldMatrix( true, false );
680
681 return vector.applyMatrix4( _m1.copy( this.matrixWorld ).invert() );
682
683 }
684
685 /**
686 * Rotates the object to face a point in world space.

Callers 2

Object3D.tests.jsFile · 0.80
pointerMoveMethod · 0.80

Calls 4

updateWorldMatrixMethod · 0.95
applyMatrix4Method · 0.45
invertMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected