Skip to content

Commit b82d7bd

Browse files
committed
WebXRController: Loose checks to avoid breaking WebXR Emulator.
1 parent 907fb0a commit b82d7bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/renderers/webxr/WebXRController.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class WebXRController {
137137
targetRay.matrix.fromArray( inputPose.transform.matrix );
138138
targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );
139139

140-
if ( inputPose.linearVelocity !== null ) {
140+
if ( inputPose.linearVelocity ) {
141141

142142
targetRay.hasLinearVelocity = true;
143143
targetRay.linearVelocity.copy( inputPose.linearVelocity );
@@ -148,7 +148,7 @@ class WebXRController {
148148

149149
}
150150

151-
if ( inputPose.angularVelocity !== null ) {
151+
if ( inputPose.angularVelocity ) {
152152

153153
targetRay.hasAngularVelocity = true;
154154
targetRay.angularVelocity.copy( inputPose.angularVelocity );
@@ -241,7 +241,7 @@ class WebXRController {
241241
grip.matrix.fromArray( gripPose.transform.matrix );
242242
grip.matrix.decompose( grip.position, grip.rotation, grip.scale );
243243

244-
if ( gripPose.linearVelocity !== null ) {
244+
if ( gripPose.linearVelocity ) {
245245

246246
grip.hasLinearVelocity = true;
247247
grip.linearVelocity.copy( gripPose.linearVelocity );
@@ -252,7 +252,7 @@ class WebXRController {
252252

253253
}
254254

255-
if ( gripPose.angularVelocity !== null ) {
255+
if ( gripPose.angularVelocity ) {
256256

257257
grip.hasAngularVelocity = true;
258258
grip.angularVelocity.copy( gripPose.angularVelocity );

0 commit comments

Comments
 (0)