Remove the default VR settings.

Let’s remove the default VR settings.


Let’s add two lines at the bottom to the default VR setting code.

// default VR setting
const avatar = REDBRICK.AvatarManager.createDefaultAvatar();
const camera = WORLD.getObject("MainCamera");
const followingCamera = avatar.setFollowingCamera(camera);
avatar.setDefaultController();
followingCamera.useVR({ VRObject: avatar });
 
followingCamera.removeVRDefaultSettings(); //remove default settings
const XRManager = followingCamera.getXRManager(); //get XR Manager

followingCamera.removeVRDefaultSettings() is a function that erases default VR settings.
const XRManager = followingCamera.getXRManager() can import the XRManager through the code.
Currently, when removeVRDefaultSettings() is performed, you can see in the video below that the Grab button jump function, which was basically attached, has disappeared.


remove_img1

In addition, you can use functions related to VR Controller as shown in the picture below through the imported XRManager.


vrImg

⚠️

Note: Non-jumping functions (screen rotation, movement, onClick) are not removed during the default setting at this time.