File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,15 @@ class CameraControls extends Script {
380
380
// mode
381
381
this . _setMode ( 'orbit' ) ;
382
382
383
+ // state
384
+ this . on ( 'state' , ( ) => {
385
+ // discard inputs
386
+ this . _desktopInput . read ( ) ;
387
+ this . _orbitMobileInput . read ( ) ;
388
+ this . _flyMobileInput . read ( ) ;
389
+ this . _gamepadInput . read ( ) ;
390
+ } ) ;
391
+
383
392
// destroy
384
393
this . on ( 'destroy' , this . _destroy , this ) ;
385
394
}
@@ -796,8 +805,8 @@ class CameraControls extends Script {
796
805
v . add ( stickRotate . mulScalar ( fly * rotateJoystickMult ) ) ;
797
806
deltas . rotate . append ( [ v . x , v . y , v . z ] ) ;
798
807
799
- // check for frame discard (entity disabled, xr active or skipUpdate)
800
- if ( this . app . xr ?. active || ! this . entity . enabled || this . skipUpdate ) {
808
+ // check for frame discard (xr active or skipUpdate)
809
+ if ( this . app . xr ?. active || this . skipUpdate ) {
801
810
frame . read ( ) ;
802
811
return ;
803
812
}
You can’t perform that action at this time.
0 commit comments