updateMatrixWorld method
force
- A boolean that can be used to bypass
matrixWorldAutoUpdate
, to recalculate the world matrix of the
object and descendants on the current frame. Useful if you cannot wait for
the renderer to update it on the next frame (assuming
matrixWorldAutoUpdate
set to true
).
Updates the global transform of the object and its descendants if the
world matrix needs update (matrixWorldNeedsUpdate set to true) or
if the force
parameter is set to true
.
Implementation
@override
void updateMatrixWorld([bool force = false]) {
super.updateMatrixWorld(force);
if (bindMode == 'attached') {
bindMatrixInverse..setFrom(matrixWorld)..invert();
}
else if (bindMode == 'detached') {
bindMatrixInverse..setFrom(bindMatrix!)..invert();
}
else {
console.warning('SkinnedMesh: Unrecognized bindMode: $bindMode');
}
}