未验证 提交 edb29932 编写于 作者: L Leven 提交者: GitHub

Improved

上级 01686f09
......@@ -89,7 +89,7 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) {
var object = intersects[ 0 ].object;
_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), object.getWorldPosition( _worldPosition ) );
_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( object.matrixWorld ) );
if ( _hovered !== object ) {
......@@ -129,7 +129,7 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) {
if ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {
_offset.copy( _intersection ).sub( _selected.getWorldPosition( _worldPosition ));
_offset.copy( _intersection ).sub( _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );
}
......@@ -204,11 +204,11 @@ THREE.DragControls = function ( _objects, _camera, _domElement ) {
_selected = intersects[ 0 ].object;
_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _selected.getWorldPosition( _worldPosition ) );
_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );
if ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {
_offset.copy( _intersection ).sub( _selected.getWorldPosition( _worldPosition ) );
_offset.copy( _intersection ).sub( _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册