@@ -89,7 +89,7 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) {
8989
9090 var object = intersects [ 0 ] . object ;
9191
92- _plane . setFromNormalAndCoplanarPoint ( _camera . getWorldDirection ( _plane . normal ) , object . getWorldPosition ( _worldPosition ) ) ;
92+ _plane . setFromNormalAndCoplanarPoint ( _camera . getWorldDirection ( _plane . normal ) , _worldPosition . setFromMatrixPosition ( object . matrixWorld ) ) ;
9393
9494 if ( _hovered !== object ) {
9595
@@ -129,7 +129,7 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) {
129129
130130 if ( _raycaster . ray . intersectPlane ( _plane , _intersection ) ) {
131131
132- _offset . copy ( _intersection ) . sub ( _selected . getWorldPosition ( _worldPosition ) ) ;
132+ _offset . copy ( _intersection ) . sub ( _worldPosition . setFromMatrixPosition ( _selected . matrixWorld ) ) ;
133133
134134 }
135135
@@ -204,11 +204,11 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) {
204204
205205 _selected = intersects [ 0 ] . object ;
206206
207- _plane . setFromNormalAndCoplanarPoint ( _camera . getWorldDirection ( _plane . normal ) , _selected . getWorldPosition ( _worldPosition ) ) ;
207+ _plane . setFromNormalAndCoplanarPoint ( _camera . getWorldDirection ( _plane . normal ) , _worldPosition . setFromMatrixPosition ( _selected . matrixWorld ) ) ;
208208
209209 if ( _raycaster . ray . intersectPlane ( _plane , _intersection ) ) {
210210
211- _offset . copy ( _intersection ) . sub ( _selected . getWorldPosition ( _worldPosition ) ) ;
211+ _offset . copy ( _intersection ) . sub ( _worldPosition . setFromMatrixPosition ( _selected . matrixWorld ) ) ;
212212
213213 }
214214
0 commit comments