Hi,
I have the following example and try to use “BABYLON.Mesh.BILLBOARDMODE_ALL” to orient the x,y, and z characters to the camera. If I commented lines 88-90 out, the x,y and z letters were located properly. However, when lines 88-90 are activated, the x,y and z letters are not rotated properly. Can someone help look at this and see what went wrong here?
Hi, @RaananW, Thanks for responding. If you look at the playground I posted, at the location with a small ball, the y and z letters are not in the right positions. If “billboardmode_all” is turned off by commenting out lines 88-90, the “y” and “z” letters are in the right positions; but those letters will not face the camera. I intended to use " billboardmode_all", but couldn’t get those letters in the right locations. Thanks again for looking into this.
They are not in the correct positions because of lines 100 - 102 where you change the direction of the axes. The labels are not parented to the axis so they remain in the same position when the axes rotate.
Have moved the camera position so that it is easier to see both sets of axes. Your PG made it difficult because the camera was not focused on the axes your were talking about. https://playground.babylonjs.com/#3D2GX1#1
Thanks for responding. As shown in the playground Lines 92-94, I did assign the axis as the parent of each label. The issue is with “Billboardmode_all”. When it is not used by commenting out Lines 88-90, each label will be positioned correctly. Can you take a second look at this? Thanks again.
I take a look at the previous post and made a minor modification to the playground you referred to as follows. https://www.babylonjs-playground.com/#UJEIL#19
You can see that when the parent rotates, the child with the “Billboard” on will stay in the same place and the left child without the “Billboard” on will rotate properly. Hopefully someone can help resolve this issue.
Thanks! @Deltakosh This answered my question. I will try to work around it. It would be nice to have a feature to update the position of the billboards to account for a global rotation (around a parent or an axis) and at the same time to rotate the billboards mesh itself around its local axis to face the camera.
you can still change the billboard position at your will.
The idea could be to have something that run per frame which sync your billboard position with a dummy (not visible)