File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -164,12 +164,14 @@ class Popup{
164
164
break ;
165
165
case "hand-tracking" :
166
166
sceneManager . heightDetectedObservable . set ( 0.25 )
167
+ sceneManager . sceneElevation = 0.7 ;
167
168
break ;
168
169
case "human-tracking" :
169
170
default :
170
171
sceneManager . heightDetectedObservable . set ( 1.2 )
171
172
break ;
172
173
}
174
+ sceneManager . objects . removeDummies ( ) ;
173
175
//reset warning messages on successive tabs
174
176
resetWarnings ( ) ;
175
177
} ) ;
Original file line number Diff line number Diff line change @@ -232,11 +232,16 @@ class ViewportManager{
232
232
//this.activeCamera.position.set(newPos.x, newPos.y, newPos.z);
233
233
this . placeCamera ( newPos ) ;
234
234
235
- orbitControls . dispose ( ) ;
236
- orbitControls = buildOrbitControls ( this ) ;
235
+ // Update camera reference in the existing OrbitControls
236
+ orbitControls . object = this . activeCamera ;
237
+ orbitControls . update ( ) ;
237
238
239
+ // Update gizmo as well
238
240
controlsGizmo . dispose ( ) ;
239
- controlsGizmo = buildGuizmo ( orbitControls , this )
241
+ controlsGizmo = buildGuizmo ( orbitControls ) ;
242
+
243
+ orbitControls . target . set ( 0 , 0 , 0 ) ;
244
+
240
245
}
241
246
242
247
@@ -252,7 +257,7 @@ class ViewportManager{
252
257
perspCam . aspect = aspect ;
253
258
perspCam . updateProjectionMatrix ( ) ;
254
259
255
- orthoCam . left = - frustumSize / 2.0 ;
260
+ orthoCam . left = - frustumSize / 2.0 ;
256
261
orthoCam . right = frustumSize / 2.0 ;
257
262
orthoCam . top = frustumSize / ( 2.0 * aspect ) ;
258
263
orthoCam . bottom = - frustumSize / ( 2.0 * aspect ) ;
You can’t perform that action at this time.
0 commit comments