# Change laser pointer color in webxr

**URL:** <https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058>\
**Category:** Questions\
**Created:** [May 22, 2020, 9:02pm UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058 "2020-05-22T21:02:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bilkusg](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@bilkusg](https://forum.babylonjs.com/u/bilkusg)\
**Post date:** [May 22, 2020, 9:02pm UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058/1 "2020-05-22T21:02:38Z")

</div>

What’s the equivalent using webxr for the VRHelper.changeLaserColor function. In other words, how do I change the color of the laser pointer after migrating my code to webxr?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 22, 2020, 9:12pm UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058/2 "2020-05-22T21:12:18Z")

</div>

Our own XR chief will definitely have the solution: @RaananW ?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 22, 2020, 9:18pm UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058/3 "2020-05-22T21:18:56Z")

</div>

But I would guess WebXRDefaultExperience.pointerSelection.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/f/f1766674e1bdde1c3e34ff8d11b3c5238f0f51cb.png)

where you should see all the different colors in use 🙂

---

<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:** [May 22, 2020, 9:33pm UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058/4 "2020-05-22T21:33:24Z")

</div>

Exactly there 🙂

Everything is exposed publicly in the feature itself. If you use the default xr experience helper, it is already available to use using `xrHelper.teleportation`

---

<div class="post-metadata">

**Author:** ![bilkusg](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@bilkusg](https://forum.babylonjs.com/u/bilkusg)\
**Post date:** [May 23, 2020, 5:55am UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058/5 "2020-05-23T05:55:21Z")

</div>

Thanks. Two follow ups:

1. Shouldn’t ‘lasterPointerDefaultColor’ be ‘laserPointerDefaultColor’ ? I think that’s a bug.
2. Should there be an explanation in the documentation? The original VR Experience docs go into quite a few things like this which the XRExperience docs are silent about and as a result it’s been quite confusing for me to work out quickly how to rewrite my VR code for XR although the result is certainly nicer in lots of ways.

---

<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:** [May 23, 2020, 7:23am UTC](https://forum.babylonjs.com/t/change-laser-pointer-color-in-webxr/11058/6 "2020-05-23T07:23:25Z")

</div>

1. Yes, you are right. Thanks 😁. typo, will be fixed
2. Yes and no. The API is documented and available, and it’s a public member of this class. So it is documented. I’m still working on finalizing the XR documentation, but I can honestly say that some public members will not be a part of it.
