Change renderingGroupId of VR Controllers/Laser

Hey,

is there a way to change the renderingGroupId of the VR Controllers and Laser Pointer?

Best regards.

You can get the controller gaze tracker mesh
https://doc.babylonjs.com/api/classes/babylon.vrexperiencehelper#leftcontrollergazetrackermesh
Then, I guess you can change properties.

2 Likes

Thanks for the tip, but leftControllerGazeTrackerMesh and rightControllerGazeTrackerMesh are not the thing you need to get, because you need to change the ID of every single mesh of the controller. Thanks for the tip anyways, because it led me in the right direction :slight_smile:

For everyone else who need this, this is my solution:

function changeVrRenderingGroupId(renderingId, scene) {
vrRig = scene.getCameraByID(“WebVRHelper”);
vrRigChildren = vrRig.getChildren(null, false);
for (let index = 0; index < vrRigChildren.length; index++) {
vrRigChildren[index].renderingGroupId = renderingId;
}

1 Like