Skip to content

Commit

Permalink
fixes camera auto zoom on Character Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCodeTherapy committed Nov 7, 2023
1 parent 2b3b892 commit 8bb54da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/3d-web-client-core/src/camera/CameraManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ export class CameraManager {
this.lerpFactor += 0.01 / this.lerpDuration;
this.lerpFactor = Math.min(1, this.lerpFactor);
this.target.lerpVectors(this.lerpTarget, this.finalTarget, this.easeOutExpo(this.lerpFactor));
} else {
this.adjustCameraPosition();
}

if (
Expand Down Expand Up @@ -196,7 +198,6 @@ export class CameraManager {
if (this.isLerping && this.lerpFactor >= 1) {
this.isLerping = false;
}
this.adjustCameraPosition();
}
}
}

0 comments on commit 8bb54da

Please sign in to comment.