I am using a PICO device 4. The left and right handles implement the teleportation function when operating the xr-standard-thumbstick. I want to move the camera forward and backward on the left handle instead of teleportation.
I found some information and this problem description fits my problem
passing this option to the teleportation will force right hand.
it is ok! Thanks
I want to move the camera forward and backward on the left hand, now it is not work.
based on PG:https://playground.babylonjs.com/#USWKXU#21
if (scene.createDefaultXRExperienceAsync) {
scene.createDefaultXRExperienceAsync({
teleportationOptions: {
teleportationTargetMesh,
forceHandedness: "right"
},
floorMeshes: [ground]
}).then((xr)=>{
if (xr) {
let featuresManager = xr.baseExperience.featuresManager; // or any other way to get a features manager
let movement = featuresManager.enableFeature(BABYLON.WebXRFeatureName.MOVEMENT,
"stable" /* or latest */, {
xrInput: xr.input,
forceHandedness: "left",
});
console.log("movement", movement);
xrInput.onControllerAddedObservable.add((controller, state) => {
if (controller.handness === 'left') {
state.skipNextObservers = true;
}
}, undefined, true);
}
})
}
This is not a bug. this is by design. You could argue that it could work, but that would require a very careful configuration on the developer part. If you think it will be helpful you can submit an issue to github and we can look into that