Hi all,
So I had to update my project to the most recent babylon engine to hopefully get around some ios bugs , anyway ( Babylon.js v4.2.1 - WebGL2 - Parallel shader compilation )
I found that there is an issue in my project now with changing transform properties.
This was previously working as is, in that I am creating some transform variants for nodes which could have any of the TRS Vector3 objects. (i only use the ones i need )
Then in the application when a specific scene requirement is met and it calls for a node transform to be updated , i am then getting a reference to these vector3 objects and then just setting the nodes position , rotation and scale ( where applicable )
one such stored node transform is stored under the key DEFAULT. I use this to just reset a transform to any of its starting values.
eg…
if (a.requiresTransformReset) {
a.requiresTransformReset = false;
//set to default transform
var t = a.collectionTransforms.DEFAULT;
if (t.location !== null && t.location !== undefined) {
a.node.position = t.location;
t.location._isDirty = true;
}
if (t.rotation !== null && t.rotation !== undefined) {
a.node.rotation = t.rotation;
}
if (t.scaling !== null && t.scaling !== undefined) {
a.node.scaling = t.scaling;
}
}
this worked before but stopped working and I traced it down to a variable in the vector3 named _isDirty
if I manually set this to true ( as can now be seen in the code above ), then it works.
but based on the fact it is a underscored field and not a setter is telling me this is technically not something I should be setting manually , i did not see a setter for it. Did something get missed here?
Seems I can set the scale back and forth just fine without changing the isDirty prop … but not position.
well I get to do one change actually , its the second change that fails without setting this _isDirty prop to true manually
the assets are loaded at runtime with BABYLON.SceneLoader.ImportMesh