Why are some of the defaults of options for WebXR Controller PointerSelection set to that?

I noticed recently that there many properties and options passed in the constructor. I see the reason for doing both, putting those in options which are used really early / consulted only once, properties for things that can be changed after the fact.

Since this feature is kind of an internal one, automatically started by WebXRDefaultExperience, unless you remove the feature & re-add yours with the options you wanted you are stuck with the defaults for the options.

There is one option, enablePointerSelectionOnAllControllers, I wonder why is not true? I hacked it, and it works. It is so much better & is like everything else on Quest, that I wonder why the value is false? I do not really need anything to be done, just bringing attention to this.

Here is my hack:

// modify stuff on pointer selection
const pointerSelFeature = <BABYLON.WebXRControllerPointerSelection> featuresManager.getEnabledFeature(BABYLON.WebXRFeatureName.POINTER_SELECTION);
pointerSelFeature.laserPointerDefaultColor = BABYLON.Color3.Red();
pointerSelFeature["_options"].enablePointerSelectionOnAllControllers = true;

cc @RaananW

The reason it is not on per default is performance. We are running a pick on each frame, and 2 picks are more expensive than one.

And there is no need to hack it. You can extend the parameters passed to the pointer selection during construction:

new WebXRDefaultExperience({
  pointerSelectionOptions: {
    enablePointerSelectionOnAllControllers: true

Well, I am glad it is not a conflict with doing this AND that thing. Makes sense given that the default is that everything is pickable.

For stuff coming from Blender via .babylon, I switched the default to not pickable last year, as you have to write code somewhere to make a pick useful. Clicking a check box is not super difficult. Faster picks, but allowing multiples I where I am going.

I did actually instance one in the course of solving my last problem, before I found a way to avoid it. My system hung. Will have to look back on my cached edits. My IDE saves / allows diffs with all manually edited files for 30 days. I did not remove the automatically created one. I did not know at the time that there was one created.

1 Like