@@ -87,6 +87,7 @@ import InspectDialog from "./ui/InspectDialog";
8787import DebugToolsPanel from "./ui/component/DebugToolsPanel" ;
8888import TemperatureInspection from "./ui/inspection/Temperature" ;
8989import Version from "./util/Version" ;
90+ import { RendererConstants } from "@wayward/game/renderer/RendererConstants" ;
9091
9192/**
9293 * An enum representing the possible states of the camera
@@ -556,14 +557,16 @@ export default class DebugTools extends Mod {
556557 public setCameraUnlocked ( unlocked : boolean ) : void {
557558 if ( unlocked ) {
558559 this . cameraState = CameraState . Unlocked ;
559- this . unlockedCameraMovementHandler . position = new Vector2 ( localPlayer ) ;
560+ this . unlockedCameraMovementHandler . position = new Vector2 ( localPlayer )
561+ . add ( RendererConstants . cameraPositionOffset ) ;
560562 this . unlockedCameraMovementHandler . velocity = Vector2 . ZERO ;
561563 this . unlockedCameraMovementHandler . transition = undefined ;
562564 this . unlockedCameraMovementHandler . homingVelocity = 0 ;
563565
564566 } else {
565567 this . cameraState = CameraState . Transition ;
566- this . unlockedCameraMovementHandler . transition = new Vector2 ( localPlayer ) ;
568+ this . unlockedCameraMovementHandler . transition = new Vector2 ( localPlayer )
569+ . add ( RendererConstants . cameraPositionOffset ) ; ;
567570 }
568571 }
569572
@@ -696,7 +699,8 @@ export default class DebugTools extends Mod {
696699 }
697700
698701 if ( this . cameraState === CameraState . Transition ) {
699- this . unlockedCameraMovementHandler . transition = new Vector2 ( localPlayer ) ;
702+ this . unlockedCameraMovementHandler . transition = new Vector2 ( localPlayer )
703+ . add ( RendererConstants . cameraPositionOffset ) ; ;
700704 if ( Vector2 . isDistanceWithin ( this . unlockedCameraMovementHandler . position , localPlayer , 0.5 ) ) {
701705 this . cameraState = CameraState . Locked ;
702706 return undefined ;
0 commit comments