# The gui control which linked mesh flashes and jumps when show,why?

**URL:** <https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635>\
**Category:** Questions\
**Tags:** gui\
**Created:** [November 29, 2021, 5:48pm UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635 "2021-11-29T17:48:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaoQiRen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/haoqiren/32/20183_2.png) [@HaoQiRen](https://forum.babylonjs.com/u/HaoQiRen)\
**Post date:** [November 29, 2021, 5:48pm UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/1 "2021-11-29T17:48:26Z")

</div>

the control link to the cube, flashes and jumps when show,why?

```auto
// cube click code
var rect1 = new Rectangle();
rect1.width = 0.2;
rect1.height = "40px";
rect1.cornerRadius = 20;
rect1.color = "Orange";
rect1.thickness = 4;
rect1.background = "green";
advancedTexture .addControl(rect1);

var label = new TextBlock();
label.text = "Sphere";
rect1.addControl(label);

rect1.linkWithMesh(cube);
rect1.linkOffsetY = -50;

```

![flash](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/0/20ad2442ba9cae673ea9d4db8020c3df2e25c6c1.gif)

---

<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:** [November 29, 2021, 6:47pm UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/2 "2021-11-29T18:47:12Z")

</div>

Hey! do you mind sharing a repro in a PG?

---

<div class="post-metadata">

**Author:** ![DarraghBurke](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/darraghburke/32/10621_2.png) [@DarraghBurke](https://forum.babylonjs.com/u/DarraghBurke)\
**Post date:** [November 29, 2021, 11:28pm UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/3 "2021-11-29T23:28:49Z")

</div>

“PG” here means Playground. To create a repro, go to [playground.babylonjs.com](http://playground.babylonjs.com), recreate the bug inside the playground, then hit the save button and share the link with us 🙂

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/5/c/5cca67b08a0e880f24790cdba79c7c02ce5a38a2.png)

PS: Welcome to the Babylon community!

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [November 30, 2021, 1:17am UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/4 "2021-11-30T01:17:23Z")

</div>

Hey there, I was really curious why this code wouldn’t work and I went ahead and made a quick playground that runs your code when the box mesh is clicked and it seems to be working. You can see below that I used an ActionManager to respond to clicks on the mesh. 🙂 🍻  
[https://playground.babylonjs.com/#6HUMYI](https://playground.babylonjs.com/#6HUMYI)

EDIT: I tried this playground repo out on version 4.2 and it does produce the flickering behavior, so I suppose it’s been fixed already. I recommend to try using the latest preview build and see if it fixes the issue for you. 🙂

---

<div class="post-metadata">

**Author:** ![msDestiny14](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/msdestiny14/32/9572_2.png) [@msDestiny14](https://forum.babylonjs.com/u/msDestiny14)\
**Post date:** [November 30, 2021, 2:22am UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/5 "2021-11-30T02:22:37Z")

</div>

Yes this was a bug in 4.2 which was fixed in this PR:

> <https://github.com/BabylonJS/Babylon.js/pull/11046>
>
> https://github.com/BabylonJS/Babylon.js/issues/11014

Like Blake has suggested, make sure you are on the latest version 5.0 preview. If there are still issues of this please let me know with a repro and I will definitely take a look!

---

<div class="post-metadata">

**Author:** ![HaoQiRen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/haoqiren/32/20183_2.png) [@HaoQiRen](https://forum.babylonjs.com/u/HaoQiRen)\
**Post date:** [November 30, 2021, 3:46am UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/6 "2021-11-30T03:46:03Z")

</div>

I change to the latest version 5.0 preview , the issue does not exist，thank you!

---

<div class="post-metadata">

**Author:** ![HaoQiRen](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/haoqiren/32/20183_2.png) [@HaoQiRen](https://forum.babylonjs.com/u/HaoQiRen)\
**Post date:** [November 30, 2021, 8:34am UTC](https://forum.babylonjs.com/t/the-gui-control-which-linked-mesh-flashes-and-jumps-when-show-why/25635/7 "2021-11-30T08:34:07Z")

</div>

thank you!
