File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ class OrbitControls extends EventDispatcher {
165165
166166 const lastPosition = new Vector3 ( ) ;
167167 const lastQuaternion = new Quaternion ( ) ;
168+ const lastTargetPosition = new Vector3 ( ) ;
168169
169170 const twoPI = 2 * Math . PI ;
170171
@@ -278,12 +279,15 @@ class OrbitControls extends EventDispatcher {
278279
279280 if ( zoomChanged ||
280281 lastPosition . distanceToSquared ( scope . object . position ) > EPS ||
281- 8 * ( 1 - lastQuaternion . dot ( scope . object . quaternion ) ) > EPS ) {
282+ 8 * ( 1 - lastQuaternion . dot ( scope . object . quaternion ) ) > EPS ||
283+ lastTargetPosition . distanceToSquared ( scope . target ) > 0 ) {
282284
283285 scope . dispatchEvent ( _changeEvent ) ;
284286
285287 lastPosition . copy ( scope . object . position ) ;
286288 lastQuaternion . copy ( scope . object . quaternion ) ;
289+ lastTargetPosition . copy ( scope . target ) ;
290+
287291 zoomChanged = false ;
288292
289293 return true ;
You can’t perform that action at this time.
0 commit comments