Hi All,
Our Team and I are going to implement the controller movement (smooth locomotion using the thumbstick) as an alternative locomotion method to the standard teleportation.
Below I am posting a code snippet where we try to switch between the 2 locomotion methods:
if (vrJoystickLocomotion) {
fm.disableFeature(WebXRMotionControllerTeleportation.Name);
fm.enableFeature(WebXRControllerMovement.Name, "latest", {
xrInput: xrHelper.input,
movementOrientationFollowsViewerPose: true, // default true
movementSpeed: 0.075,
rotationSpeed: 0.25
});
} else {
fm.disableFeature(WebXRControllerMovement.Name);
xrHelper.teleportation = fm.enableFeature(
WebXRMotionControllerTeleportation.Name,
"stable" /* or latest */,
{
xrInput: xrHelper.input,
floorMeshes: []
}
);
Unfortunately, this doesn’t work as the problem seems to be caused by disableFeature()
not sorting any effect.
Therefore we end up getting these 2 errors depending on which locomotion method we start with (either controller movement or locomotion) and then try to switch to the other one:
Uncaught Error: Feature xr-controller-teleportation cannot be enabled while xr-controller-movement is enabled.
Uncaught Error: Feature xr-controller-movement cannot be enabled while xr-controller-teleportation is enabled.
Thank you for any info and help!
Tagging @RaananW as well
Danilo
FRAME Team