Skip to content

Commit

Permalink
fix(hoverContoller): opt maxDistance
Browse files Browse the repository at this point in the history
  • Loading branch information
lslzl3000 committed Aug 4, 2023
1 parent 23db052 commit 8cd1498
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/controller/HoverCameraController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export class HoverCameraController extends ComponentBase {
this.roll = roll;
this.pitch = pitch;
this.distance = distance;
this.maxDistance = distance * 1.2;
if(this.maxDistance < distance * 1.5){
this.maxDistance = distance * 1.5;
}
if (target) {
this._targetPos.transform.localPosition.copy(target);
}
Expand Down

0 comments on commit 8cd1498

Please sign in to comment.