diff --git a/cocos/scene-graph/node.ts b/cocos/scene-graph/node.ts index 7e4e846e8f..d9b984108c 100644 --- a/cocos/scene-graph/node.ts +++ b/cocos/scene-graph/node.ts @@ -193,7 +193,7 @@ class Node extends BaseNode { vec3.copy(this._pos, this._lpos); quat.copy(this._rot, this._lrot); vec3.copy(this._scale, this._lscale); - this._eulerDirty = this._dirty = this._hasChanged = true; + this._dirty = this._hasChanged = true; this._eventMask = 0; for (const child of this._children) { child._onBatchCreated(); @@ -204,6 +204,11 @@ class Node extends BaseNode { this._onBatchCreated(); } + public _onBeforeSerialize () { + // tslint:disable-next-line: no-unused-expression + this.eulerAngles; // make sure we save the correct eulerAngles + } + // =============================== // transform helper, convenient but not the most efficient // ===============================