Skip to content

Commit

Permalink
fix: transoform rotate bug when relativeToLocal is true (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoLei1990 authored Mar 22, 2022
1 parent 1ea89ab commit b211d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ export class Transform extends Component {
if (relativeToLocal) {
Quaternion.multiply(this.rotationQuaternion, rotateQuat, this._rotationQuaternion);
} else {
Quaternion.multiply(this.worldRotationQuaternion, rotateQuat, this._worldRotationQuaternion);
Quaternion.multiply(rotateQuat, this.rotationQuaternion, this._rotationQuaternion);
}
}

Expand Down

0 comments on commit b211d66

Please sign in to comment.