mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 02:02:41 +08:00
Merge pull request #2388 from pandamicro/next
Fix quat not initialized issue
This commit is contained in:
@@ -1055,10 +1055,14 @@ var Node = cc.Class({
|
||||
this._scale.y = this._scaleY;
|
||||
this._scaleY = undefined;
|
||||
}
|
||||
// Upgrade rotationX, rotationY from v1.x
|
||||
// TODO: remove in future version, 3.0 ?
|
||||
|
||||
|
||||
// TODO: remove _rotationX & _rotationY in future version, 3.0 ?
|
||||
// Update quaternion from rotation
|
||||
if (this._rotationX === this._rotationY) {
|
||||
math.quat.fromEuler(this._quat, 0, 0, -this._rotationX);
|
||||
}
|
||||
else {
|
||||
math.quat.fromEuler(this._quat, this._rotationX, this._rotationY, 0);
|
||||
}
|
||||
|
||||
var prefabInfo = this._prefab;
|
||||
if (prefabInfo && prefabInfo.sync && prefabInfo.root === this) {
|
||||
|
||||
Reference in New Issue
Block a user