Fix offset focus

This commit is contained in:
NeeEoo
2024-04-13 22:45:00 +02:00
parent 9e9e4cd2b8
commit f0f1ab2133
+1 -2
View File
@@ -472,9 +472,8 @@ class StageEditor extends UIState {
} }
function focusCharacter(char:Character) { function focusCharacter(char:Character) {
// TODO: fix this being incorrect
var point = char.getCameraPosition(); var point = char.getCameraPosition();
nextScroll.set(point.x, point.y); nextScroll.set(point.x - stageCamera.width / 2, point.y - stageCamera.height / 2);
setZoom(stage.defaultZoom); setZoom(stage.defaultZoom);
} }