Skip to content

Commit 4b69036

Browse files
authored
Merge pull request #14813 from soadzoor/add-webxr-inputsource-into-controllers-userdata
WebXRManager: Save inputSource in userData of controller
2 parents 0db40fa + d9e67c1 commit 4b69036

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/renderers/webvr/WebXRManager.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ function WebXRManager( renderer ) {
141141
inputSources = session.getInputSources();
142142
console.log( inputSources );
143143

144+
for ( var i = 0; i < controllers.length; i ++ ) {
145+
146+
var controller = controllers[ i ];
147+
controller.userData.inputSource = inputSources[ i ];
148+
149+
}
150+
144151
} );
145152

146153
}

0 commit comments

Comments
 (0)