Line end-point delay - speech bubble

Hello Everyone,

I’m trying to build a speech bubble dialog system. I have a line drawn from an object to another object parented to the camera.

The end point of the line is supposed to be drawn to the center of the box. When walking around (WASD or arrow keys) or swiveling with the mouse, the line lags behind and often pokes through the box. Anybody have an idea why this happens?

Thanks for the help!

I finally found the solution. I added a dialogBox.computeWorldMatrix(true);
https://playground.babylonjs.com/#K8FCY7#2

I’ve read what I can on computeWorldMatrix but still don’t know why this fixes it. Any chance someone can enlighten me?

1 Like

See

As you are using onBeforeRender the same holds

2 Likes