Skip to content

Commit

Permalink
fix: position is deleted from entity (#699)
Browse files Browse the repository at this point in the history
Co-authored-by: shensi.zxd <[email protected]>
  • Loading branch information
zhuxudong and shensi.zxd authored Mar 22, 2022
1 parent b940b04 commit 89f7517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/controls/src/OrbitControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export class OrbitControl extends Script {
*/
pan(deltaX: number, deltaY: number) {
// perspective only
const position: Vector3 = this.camera.position;
const position: Vector3 = this.camera.transform.position;
position.cloneTo(this._vPan);
this._vPan.subtract(this.target);
let targetDistance = this._vPan.length();
Expand Down

0 comments on commit 89f7517

Please sign in to comment.