Target is shaking when moved by slider

In this scene I have 3 boxes. The camera is targeted on the central box (box1):

https://playground.babylonjs.com/#1A3M5C#139

When box1.position is updated in the scene.beforeRender method by incrementing the variable alpha, the box stays in the center of the screen as expected (commented lines).

But when alpha is changed with a slider (actual version of the playground), box1 is shaking around the center of the screen when the slider is used to change alpha…

How should I proceed to alter this behavior?

Welcome aboard!

For some reason you need to call computeWorldMatrix() in the slider case:

https://playground.babylonjs.com/#1A3M5C#141

I don’t know why, however…

Hello !

Thank you very much for your solution !

Why it is working is not very important for me : there are so many things in (fantastic) BABYLON that I use, but don’t really understand anyway…

Yours sincerely,

L. Schellenberg