# In VR mode, change the width and color of the handle light invalid

**URL:** <https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558>\
**Category:** Questions\
**Tags:** material, ray, vr\
**Created:** [June 12, 2023, 6:22am UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558 "2023-06-12T06:22:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pxim](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pxim/32/26372_2.png) [@pxim](https://forum.babylonjs.com/u/pxim)\
**Post date:** [June 12, 2023, 6:22am UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/1 "2023-06-12T06:22:39Z")

</div>

In VR mode, change the width and color of the handle light invalid.

DEMO：[https://playground.babylonjs.com/#ABDDD6#57](https://playground.babylonjs.com/#ABDDD6#57)  
VR Device: [PICO NEO 3](https://www.picoxr.com/cn/neo3/)  
@babylonjs/core: ^6.3.1

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/0/a0a5c6eb1732f045938668a58e90feef333c7d2c.png)

After this code is running, the handle light has not changed anymore .

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/3/23f13b862fb2ce8aa2e7f5c2fe633370092a50df.jpeg)

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/d/2d81631173a4df1422482001073356d643abb7ba.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/d/2d81631173a4df1422482001073356d643abb7ba.mp4)

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [June 12, 2023, 1:31pm UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/2 "2023-06-12T13:31:54Z")

</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:** [June 12, 2023, 1:35pm UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/3 "2023-06-12T13:35:36Z")

</div>

You are using the deprecated webvr experience helper, which has much less configuration options than the xr experience helper. Switch to the XR experience helper would be my first recommendation.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/1/a1308861924544c27ed715e7d8fcfd91e74291ea.png)

---

<div class="post-metadata">

**Author:** ![pxim](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pxim/32/26372_2.png) [@pxim](https://forum.babylonjs.com/u/pxim)\
**Post date:** [June 13, 2023, 1:27am UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/4 "2023-06-13T01:27:50Z")

</div>

XR DEMO: [xr-gui-h1-test | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#ABDDD6#68)

This is an XR case, but the handle light has not changed. I don’t know how to set it up.

---

<div class="post-metadata">

**Author:** ![pxim](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pxim/32/26372_2.png) [@pxim](https://forum.babylonjs.com/u/pxim)\
**Post date:** [June 13, 2023, 8:43am UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/5 "2023-06-13T08:43:34Z")

</div>

> **[Babylon.js Playground](https://playground.babylonjs.com/#ABDDD6%2369)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

In this case, can change the line color of the handle,  
but there is still no way to change the width.

And why the handle line color will be affected by HighlightLayer?

---

<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:** [June 13, 2023, 12:11pm UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/6 "2023-06-13T12:11:42Z")

</div>

You can provide a different mesh if you want to override the default laser pointer mesh. It’s part of the options (`customLasterPointerMeshGenerator`). The default is:

```auto
CreateCylinder(
                  "laserPointer",
                  {
                      height: 1,
                      diameterTop: 0.0002,
                      diameterBottom: 0.004,
                      tessellation: 20,
                      subdivisions: 1,
                  },
                  scene
              );

```

This way you are in full control of the mesh.

---

<div class="post-metadata">

**Author:** ![pxim](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pxim/32/26372_2.png) [@pxim](https://forum.babylonjs.com/u/pxim)\
**Post date:** [June 14, 2023, 5:15am UTC](https://forum.babylonjs.com/t/in-vr-mode-change-the-width-and-color-of-the-handle-light-invalid/41558/7 "2023-06-14T05:15:22Z")

</div>

Solved, thank you very much.
