mutateLocalTransform method
void
mutateLocalTransform(
- void edit(
- Matrix4 transform
Edits localTransform in place through edit, then marks the node
stale.
The correct way to reach for the raw matrix, since a bare
localTransform.translateByVector3(...) mutates the live matrix without
dirtying the cache and the node silently will not move. position,
rotation, and scale cover most edits without a matrix.
node.mutateLocalTransform((m) => m.translateByVector3(Vector3(0.0, 1.0, 0.0)));
Implementation
void mutateLocalTransform(void Function(Matrix4 transform) edit) {
edit(_localTransform);
_localTransformTrs = null;
markTransformDirty();
}