mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
fix euler data problem (#4486)
* fix euler data problem * update euler before serialize
This commit is contained in:
@@ -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
|
||||
// ===============================
|
||||
|
||||
Reference in New Issue
Block a user