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

**URL:** <https://forum.babylonjs.com/t/why-are-some-of-the-defaults-of-options-for-webxr-controller-pointerselection-set-to-that/27684>\
**Category:** Questions\
**Tags:** webxr\
**Created:** [February 15, 2022, 6:31pm UTC](https://forum.babylonjs.com/t/why-are-some-of-the-defaults-of-options-for-webxr-controller-pointerselection-set-to-that/27684 "2022-02-15T18:31:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [February 15, 2022, 6:31pm UTC](https://forum.babylonjs.com/t/why-are-some-of-the-defaults-of-options-for-webxr-controller-pointerselection-set-to-that/27684/1 "2022-02-15T18:31:02Z")

</div>

I noticed recently that there many properties and [options](https://github.com/BabylonJS/Babylon.js/blob/master/src/XR/features/WebXRControllerPointerSelection.ts#L30) 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:

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

```

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [February 15, 2022, 9:46pm UTC](https://forum.babylonjs.com/t/why-are-some-of-the-defaults-of-options-for-webxr-controller-pointerselection-set-to-that/27684/2 "2022-02-15T21:46:03Z")

</div>

cc @RaananW

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 16, 2022, 11:26am UTC](https://forum.babylonjs.com/t/why-are-some-of-the-defaults-of-options-for-webxr-controller-pointerselection-set-to-that/27684/3 "2022-02-16T11:26:16Z")

</div>

> [@JCPalmer](#):
>
> 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.

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:

```javascript
new WebXRDefaultExperience({
  //....
  pointerSelectionOptions: {
    enablePointerSelectionOnAllControllers: true
  }
})

```

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [February 16, 2022, 3:14pm UTC](https://forum.babylonjs.com/t/why-are-some-of-the-defaults-of-options-for-webxr-controller-pointerselection-set-to-that/27684/4 "2022-02-16T15:14:57Z")

</div>

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.
