Hey @All - I wonder if it is possible to change a meshes billboard_mode at runtime without forcing my page to reload?
I attached Labels to Meshes and noticed that a User might want them to behave differently. So I tried to write a quick function to get them to, and know I can easily switch the billboard_mode from ALL to NONE in a second, but still I have to reload the site if I want them to change back from NONE to ALL
Edit: So the Switch from NONE to ALL seems not to work for me at runtime, my workaround just reloads the scene with the original implementation of actualmesh.billboardMode = BABYLON.Mesh.BILLBOARDMODE_ALL; I have in my code when I instance my Labels before.
var myLabelMesh = scene.getMeshByName(abstractmesh_Id);
try{
console.log("try to change billboardmode");
console.log("meshes billboasrd_mode is: " + myLabelMesh.billboardMode);
if(myLabelMesh.billboardMode==0){
try{
console.log("change billboradmode from NONE to ALL");
myLabelMesh.billboardMode = BABYLON.Mesh.BILLBOARDMODE_ALL;
location.reload();
}catch{
console.log("billboardmode set to BABYLON.Mesh.BILLBOARDMODE_ALL failed");
}
}
if(myLabelMesh.billboardMode==7){
myLabelMesh.billboardMode = BABYLON.Mesh.BILLBOARDMODE_NONE;
}
}catch{
console.log("changing billboard mode failed");
}
}
Any Suggestions how to fix?