LinkWithMesh causes some flickering on button creation

Hello everyone !

I have a question about the implementation of linkWithMesh, because I’m facing to a problem about the creation of a simple control and the use of linkWithMesh. During the spawning, the control position is not correct during one frame and after that it keep the right coordinates. It can be visualized in this PG : Babylon.js Playground

Can it be fixed or is it an edge effect of linkWithMesh ?


Welcome aboard!

I tried to have a look and tested some different things, but I couldn’t find why the first frame is not ok… Maybe others will have a solution!

It definitely sounds like a bug to me, @msDestiny14 will be back tomorrow and should be able to have a look

Yep this is a bug imo. The issue is coming down to line 1322 in control.ts:

var newTop = ((projectedPosition.y + this._linkOffsetY.getValue(this._host)) - this._currentMeasure.height / 2);

where this._currentMeasure.height is not being set yet before the first frame. Working on a fix for you :slight_smile:

1 Like

Good morning! Just for an update on this, here is the PR fix: Fix for LinkWithMesh causes some flickering on button creation by msDestiny14 · Pull Request #11046 · BabylonJS/Babylon.js · GitHub

Should end up in nightly soon and out to you! :smiley:


Thnaks a lot!

It will be available only in nightly or it will be integrated in current LTS ?

In any case, thanks folks for your quick reactions ! :ok_hand:

1 Like