Instances with billboard mode do not follow parent rotation

Repro: https://playground.babylonjs.com/#8MQFU6#1

Open inspector, rotate the cube around the y-axis, the instance does not follow. Comment out line 36 instance.billboardMode = BABYLON.Mesh.BILLBOARDMODE_ALL, rotate the cube again, instance follows parent. wai again?

Hey! you need to add this line to allow parent rotation to be transfered to child if they are using billboard:
BABYLON.TransformNode.BillboardUseParentOrientation = true;

3 Likes

So the previous fix no longer causes instances to inherit billboard, in doing so, now users can choose which instances to bb and which not to. But this flag isn’t scene/mesh specific. hmm, seems iffy. Marking as solved, thanks!

Yeah I agree for the scene specific, this sucks…I wanted to limit the amount of properties on mesh at that time (we were not able to go above 128 with massive perf loss: My fat objects are slower than my thin ones | Eternalcoding)

1 Like

well, the flag doesn’t work for me as I have instances with billboard that need to follow parent rotation and some that don’t.